1 Reply Latest reply on Oct 26, 2006 7:25 PM by Jason Greene

    Bad mapping from wsdl using wstools

    Richard Fagot Newbie

      Hello,

      I used wstools to generate the client side given a WSDL that contains the user types schema. Unfortunately the classes generated do not correspond to what is expected (or what I expect). The FakeType class contains a list of param (as expected) and a list of Item instead of a list of ListType. What's wrong ?

      <wsdl:types>
      <s:schema elementFormDefault="qualified" targetNamespace="http://www.siautomation.com/Maestria/schemas/Supervision">
      <s:element name="MainType">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="FakeType" type="s0:FakeType"/>
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:complexType name="FakeType">
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="Param" type="s0:Param"/>
      <s:element minOccurs="0" maxOccurs="unbounded" name="ItemList" nillable="true" type="s0:ListType"/>
      </s:sequence>
      </s:complexType>
      <s:complexType name="Param">
      <s:simpleContent>
      <s:extension base="s:string">
      <s:attribute name="Name" type="s:string"/>
      </s:extension>
      </s:simpleContent>
      </s:complexType>
      <s:complexType name="ListType">
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="Item" type="s0:Item"/>
      </s:sequence>
      <s:attribute name="Name" type="s:string"/>
      </s:complexType>
      <s:complexType name="Item">
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="Param" type="s0:Param"/>
      </s:sequence>
      <s:attribute name="Name" type="s:string"/>
      </s:complexType>
      </s:schema>
      </wsdl:types>

      <wsdl:message name="MainTypeSoapIn">
      <wsdl:part name="parameters" element="s0:MainType"/>
      </wsdl:message>

      <wsdl:portType name="MyPort">
      <wsdl:operation name="MainType">
      <wsdl:input message="tns:MainTypeSoapIn"/>
      </wsdl:operation>
      </wsdl:portType>

      <wsdl:binding name="MyPort" type="tns:MyPort">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
      <wsdl:operation name="MainType">
      <soap:operation soapAction="myUrl/MainType" style="document"/>
      <wsdl:input>
      <soap:body use="literal"/>
      </wsdl:input>
      </wsdl:operation>
      </wsdl:binding>

      <wsdl:service name="MyService">
      <wsdl:port name="MyPort" binding="tns:MyPort">
      <soap:address location="URL"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>