Loading ...
Sorry, an error occurred while loading the content.

Serialzation of "choice"

Expand Messages
  • Rosimildo daSIlva
    Given the WSDL below, assuming it is correct, how the serialization would look like. I am interested in how choice grouping is mapped on the wire. Skiping
    Message 1 of 1 , Mar 30, 2002
    • 0 Attachment
      Given the WSDL below, assuming it is correct, how the
      serialization would look like. I am interested in
      how "choice" grouping is mapped on the wire.

      Skiping all "SOAP" elements, and "xsd" attributes.

      <user>
      <name>Joe</name>
      <address>
      <street>1111 Foo</street>
      <city>New York</city>
      <state>NY</state>
      <zipcode>11111</zipcode>
      </address>
      <myState>NY</myState>
      <myChoice>
      <isProgrammer>true</isProgrammer>
      </myChoice>
      </user>


      Is this correct ?

      ----------------------------------------------------

      <?xml version="1.0" encoding="utf-8"?>
      <wsdl:definitions
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdlns="http://tempuri.com/"

      xmlns:typens="http://tempuri.com/xsd"

      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

      xmlns:xsd="http://www.w3.org/2001/XMLSchema"

      xmlns:esd="http://esd.esoapcg.com/esd/"

      targetNamespace="http://tempuri.com/" name="echo">
      <wsdl:types>
      <xsd:schema
      xmlns="http://www.w3.org/2001/XMLSchema"

      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"


      targetNamespace="http://tempuri.com/xsd">
      <xsd:simpleType name="SomeStates"
      base="xsd:string">
      <xsd:restriction base="xsd:string">
      <xsd:enumeration value="TX"/>
      <xsd:enumeration value="FL"/>
      <xsd:enumeration value="CA"/>
      <xsd:enumeration value="NY"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:complexType name="Address">
      <xsd:all>
      <xsd:element name="street"
      type="xsd:string"/>
      <xsd:element name="city"
      type="xsd:string"/>
      <xsd:element name="state"
      type="xsd:string"/>
      <xsd:element name="zipcode"
      type="xsd:int"/>
      </xsd:all>
      </xsd:complexType>
      <xsd:complexType name="UserProfile">
      <xsd:all>
      <xsd:element name="name"
      type="xsd:string"/>
      <xsd:element name="address"
      type="typens:Address"/>
      <xsd:element name="myState"
      type="typens:SomeStates"/>
      <xsd:element name="myChoice"
      type="typens:MyChoice"/>
      </xsd:all>
      </xsd:complexType>
      <xsd:complexType name="MyChoice">
      <all>
      <xsd:choice>
      <xsd:element name="age"
      type="xsd:int"/>
      <xsd:element name="isProgrammer"
      type="xsd:boolean"/>
      <xsd:element name="linesOfCode"
      type="xsd:long"/>
      <xsd:element name="yearsExperience"
      type="xsd:int"/>
      </xsd:choice>
      </all>
      </xsd:complexType>
      </xsd:schema>
      </wsdl:types>
      <wsdl:message name="RequestEcho">
      <wsdl:part name="user"
      type="typens:UserProfile"/>
      </wsdl:message>
      <wsdl:message name="ResponseEcho">
      <wsdl:part name="name" type="xsd:string"/>
      <wsdl:part name="age" type="xsd:int"/>
      <wsdl:part name="zipcode" type="xsd:int"/>
      </wsdl:message>
      <wsdl:portType name="Echo">
      <wsdl:operation name="echo">
      <wsdl:input message="wsdlns:RequestEcho"/>
      <wsdl:output message="wsdlns:ResponseEcho"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="BindingEcho"
      type="wsdlns:Echo">
      <soap:binding style="rpc"
      transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="echo">
      <soap:operation
      soapAction="http://tempuri.com/"/>
      <wsdl:input>
      <soap:body use="encoded"
      namespace="http://tempuri.com/"

      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </wsdl:input>
      <wsdl:output>
      <soap:body use="encoded"
      namespace="http://tempuri.com/"

      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="echo">
      <wsdl:port name="Echo"
      binding="wsdlns:BindingEcho">
      <soap:address
      location="http://localhost:8080/rpcrouter"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>


      __________________________________________________
      Do You Yahoo!?
      Yahoo! Greetings - send holiday greetings for Easter, Passover
      http://greetings.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.