I have a complexType that contains a <choice> of two alternative
elements, like this:

<xsd:complexType name="AorB">
    <xsd:choice>
        <xsd:element name="A" type="xsd:string"/>
        <xsd:element name="B" type="xsd:string"/>
    </xsd:choice>
</xsd:complexType>

and a reponse message that contains a value of this type:

<message name="respmessage">
    <part name="resp" type="asxsd:AorB"/>
</message>

and a portType with an operation that returns the response message:

<portType name="FooPortType">
    <operation name="Bar">
        <input .../>
        <output message="as:respmessage"/>
    </operation>
</portType>

WSDL2Java generates a class  AorB and requires it as content of the
respmessage to be returned from the Bar() method in the generated
FooPortTypeSkeleton.  However, AorB has no setters or getters, so there
is no way to give it the A or B element to return.  Also, A and B do not
extend AorB so there is no way to pass either of them directly.

How is this supposed to work?

Thanks for any help,

Chuck

Reply via email to