I am having a problem with new XSD2JavaGenerator (M2 was OK) and it generates 
code that cannot be compiled in case when container element has non-containment 
reference to the container. 
Entire xsd file is attched.
In this case I want to use static API and I want to get sales order header 
(SoH) from its lines (SoL) using the same Java code (getter) as in case when I 
use corresponding POJO's.
It works fine if property is non-containment reference to no container class 
(SoL references product or SoH references Customer). 

I am a new in this community and I do not know if this is considered as a bug 
who and how should open it. Please, advise.

    <xsd:complexType name="SoH">
        <xsd:sequence>
            <xsd:element name="customer" type="xsd:IDREF" 
sdoxml:propertyType="impl:Customer" sdoxml:oppositeProperty="soHs" 
minOccurs="1" maxOccurs="1" />
            <xsd:element name="lines" type="impl:SoL" minOccurs="0" 
maxOccurs="unbounded" />
            <xsd:element name="number" type="xsd:string" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="receivedDate" type="xsd:date" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="modifiedBy" type="xsd:string" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="lastUpdated" type="xsd:dateTime" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="created" type="xsd:date" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="id" type="xsd:long" minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attribute name="xmlId" type="xsd:ID"/>
    </xsd:complexType>

    <xsd:complexType name="SoL">
        <xsd:sequence>
            <xsd:element name="order" type="xsd:IDREF" 
sdoxml:propertyType="impl:SoH" sdoxml:oppositeProperty="lines" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="product" type="xsd:IDREF" 
sdoxml:propertyType="impl:Product" sdoxml:oppositeProperty="soLs" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="soLineSch" type="impl:SoLSch" minOccurs="0" 
maxOccurs="unbounded" />
            <xsd:element name="quantity" type="xsd:double" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="requestedDate" type="xsd:date" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="modifiedBy" type="xsd:string" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="lastUpdated" type="xsd:dateTime" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="created" type="xsd:date" minOccurs="1" 
maxOccurs="1"/>
            <xsd:element name="id" type="xsd:long" minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attribute name="xmlId" type="xsd:ID"/>
    </xsd:complexType>

Regards,
Miro



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to