Hi Christopher,
I am not sure I fully understand the problem .. :-(. Do you have
problems with e.g. unmarshalling, using the classes generated by
Castor's code generator ? Or am I mis-reading something completely ?
Werner
[EMAIL PROTECTED] wrote:
hi
I am fairly new to castor, so I hope this is not a silly question ...
I want to generate java classes from a schema, part of which is
<xsd:schema elementFormDefault="qualified"
xmlns:xsdLocal0="http://www.siebel.com/xml/Account%20Interface"
attributeFormDefault="unqualified"
targetNamespace="http://www.siebel.com/xml/Account%20Interface"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
...
<xsd:complexType name="ListOfAccountInterface">
<xsd:sequence>
<xsd:element name="Account" maxOccurs="1" minOccurs="0"
type="xsdLocal0:ArrayOfAccount">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfAccount">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute aPrefix:arrayType="xsdLocal0:Account[]"
ref="soapenc:arrayType" xmlns:aPrefix="http://schemas.xmlsoap.org/wsdl/">
</xsd:attribute>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Account">
<xsd:sequence>
<xsd:element name="AccountId" maxOccurs="1" minOccurs="0"
type="xsd:string"></xsd:element>
<xsd:element name="AccountStatus" maxOccurs="1" minOccurs="0"
type="xsd:string"></xsd:element>
...
</xsd:complexType>
</xsd:schema>
Now, castor builds me a bunch of java classes as expected, plus the
associated Descriptors. The trouble I have is with the ArrayOfAccount
class. The descriptor that is built tells me that it is an array, but
not what the *type* of the array element is. All I can extract from
the ArrayOfAccountDescriptor call is an XMLFieldDescriptor for the
_arrayType field, but there is nothing in that that indicates that the
underlying array item is of type Account. The WSDL, however, does tell
me that the ArrayOfAccount type contains am array of Account type items.
But I guess this is done through the restriction definition that is
associated witht he ArrayOfAccount type definition.
Is there anything I can do in the codegenstep that would insert extra
meta data info inthe Descriptor class that would enable me
programmatically to determine the Array Type ?
I am not sure how castor figures out that ArrayOfAccount is an array to
start with, so am unsure how to get it to determine the correct array here.
Any pointers would be much appreciated !
thanks
chris
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email