users@jax-rpc.java.net

Re: Choice Options

From: Alessio Cervellin <alessio.cervellin_at_sun-cs-italy.com>
Date: Wed, 13 Jul 2005 09:22:00 +0200

AFAIK the <choice> element is not being "properly" supported, at least
in JWSDP1.5 (i don't know what about 1.6).
Whenever possible, I'd suggest to not use this kind of element.
See also:
https://jax-rpc.dev.java.net/servlets/BrowseList?list=users&by=thread&from=207495

Gaurav Sharma wrote:
> Hi,
>
> On trying to generate the skeleton classes for the
> following WSDL, I see that the whole code is changed
> to ArrayList owing to the fact that Choice is
> referencing the same element twice. This is a valid
> XML schema and should have proper code generation. The
> WSDL is attached belwo
>
> Regards,
> Gaurav Sharma
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions name="TrialAddress"
> targetNamespace="http://shepway.gov.uk"
> xmlns:tns="http://shepway.gov.uk"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> <types>
> <xsd:schema
> xmlns="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> targetNamespace="http://shepway.gov.uk">
>
> <complexType name="findAddressResponse">
> <sequence>
> <element name="return" type="xsd:string" />
> <element name="return2" type="xsd:string" />
> <element name="return3" type="xsd:string" />
> </sequence>
> </complexType>
> <element name="findAddressResponse"
> type="tns:findAddressResponse" />
>
> <complexType name="findAddress">
> <sequence>
> <element name="arg0" type="xsd:string" />
> <xsd:element name="PostTown"
> type="tns:PostTownType" minOccurs="0"/>
> <xsd:sequence>
> <xsd:element name="StreetDescription"
> type="tns:StreetDescriptorType"/>
> <xsd:element
> name="UniqueStreetReferenceNumber" type="tns:USRNtype"
> minOccurs="0"/>
> </xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element
> ref="tns:A1"/>
> <xsd:element
> ref="tns:B1"/>
> <xsd:element
> name="C1" type="xsd:string"/>
> <xsd:element
> name="D1" type="xsd:string"/>
> <xsd:choice>
>
> <xsd:sequence>
>
> <xsd:element name="A3" type="xsd:string"/>
>
> <xsd:element name="B3" type="xsd:string"/>
>
> </xsd:sequence>
> <xsd:element
> name="B33" type="xsd:string"/>
> </xsd:choice>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element
> ref="tns:A1"/>
> <xsd:element
> name="B2" type="xsd:string"/>
> <xsd:element
> name="C2" type="xsd:string"/>
> <xsd:element
> name="D2" type="xsd:string"/>
> </xsd:sequence>
> <xsd:element
> name="X12" type="xsd:string"/>
> </xsd:choice>
> </sequence>
> </complexType>
> <element name="findAddress1"
> type="tns:findAddress" />
>
> <element name="FindAddressFault"
> type="tns:FindAddressFault" />
> <complexType name="FindAddressFault">
> <sequence>
> <element name="faultInfo" type="xsd:string"
> />
> <element name="message" type="xsd:string" />
> </sequence>
> </complexType>
>
> <xsd:simpleType name="PostTownType">
> <xsd:restriction base="xsd:string">
> <xsd:minLength value="1"/>
> <xsd:maxLength value="30"/>
> </xsd:restriction>
> </xsd:simpleType>
>
> <xsd:simpleType name="StreetDescriptorType">
> <xsd:restriction base="xsd:string">
> <xsd:minLength value="1"/>
> <xsd:maxLength value="100"/>
> </xsd:restriction>
> </xsd:simpleType>
>
> <xsd:simpleType name="USRNtype">
> <xsd:restriction base="xsd:integer">
> <xsd:minInclusive value="1"/>
> <xsd:maxInclusive value="99999999"/>
> </xsd:restriction>
> </xsd:simpleType>
> <xsd:simpleType name="USRNtype1">
> <xsd:restriction base="xsd:integer">
> <xsd:minInclusive value="1"/>
> <xsd:maxInclusive value="99999999"/>
> </xsd:restriction>
> </xsd:simpleType>
> <xsd:simpleType name="USRNtype2">
> <xsd:restriction base="xsd:integer">
> <xsd:minInclusive value="1"/>
> <xsd:maxInclusive value="99999999"/>
> </xsd:restriction>
> </xsd:simpleType>
> <xsd:element name="A1" type="tns:USRNtype1"/>
> <xsd:element name="B1" type="tns:USRNtype2"/>
> <xsd:element name="A2" type="tns:USRNtype1"/>
> </xsd:schema>
> </types>
> <message name="findAddress">
> <part name="parameters" element="tns:findAddress1"
> />
> </message>
> <message name="findAddressResponse">
> <part name="result"
> element="tns:findAddressResponse" />
> </message>
> <message name="findAddressFault">
> <part name="FindAddressFault"
> element="tns:FindAddressFault" />
> </message>
> <portType name="FindAddressPortType">
> <operation name="findAddress">
> <input message="tns:findAddress" />
> <output message="tns:findAddressResponse" />
> <fault name="findAddressFault"
> message="tns:findAddressFault"/>
> </operation>
> </portType>
> <binding name="FindAddressBinding"
> type="tns:FindAddressPortType">
> <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http"
> style="document" />
> <operation name="findAddress">
> <soap:operation soapAction="" />
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> <fault name="findAddressFault">
> <soap:fault name="findAddressFault"
> use="literal" />
> </fault>
> </operation>
> </binding>
> <service name="FindAddressService">
> <port name="FindAddressPort"
> binding="tns:FindAddressBinding">
> <soap:address
> location="http://localhost:8080/axis/services/FindAddressService"
> />
> </port>
> </service>
> </definitions>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
>