WSDL array definition

Dec 16, 2009 at 9:10 AM

Hi Matteo,

 

I having problme using the Javascript soap client when using my wsdl? The array is defined in a different format for the service GetProductList3Response.

Here is my wsdl:

 

<definitions name="IROAGservice" targetNamespace="http://tempuri.org">

<types>

<xs:schema targetNamespace="schemas.xmlsoap.org/soap/encoding/">

<xs:complexType name="arrayofProdRec">

<xs:complexContent>

<xs:restriction base="soapenc:Array">
<xs:sequence/>
<xs:attribute ref="soapenc:arrayType" n1:arrayType="ns1:ProdRec[]"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="ProdRec">

<xs:sequence>
<xs:element name="ArtNo" type="xs:string"/>
<xs:element name="ProdID" type="xs:string"/>
<xs:element name="ProdName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="HelloWorld0Request"/>
+
<message name="HelloWorld0Response">
<part name="return" type="xs:string"/>
</message>
+
<message name="HelloTo1Request">
<part name="AName" type="xs:string"/>
</message>
+
<message name="HelloTo1Response">
<part name="return" type="xs:string"/>
</message>
<message name="GetProducts2Request"/>
+
<message name="GetProducts2Response">
<part name="return" type="xs:string"/>
</message>
<message name="GetProductList3Request"/>

<message name="GetProductList3Response">
<part name="return" type="ns1:arrayofProdRec"/>
</message>
+
<portType name="IROAG">

<operation name="HelloWorld">
<input message="tns:HelloWorld0Request"/>
<output message="tns:HelloWorld0Response"/>
</operation>

<operation name="HelloTo">
<input message="tns:HelloTo1Request"/>
<output message="tns:HelloTo1Response"/>
</operation>

<operation name="GetProducts">
<input message="tns:GetProducts2Request"/>
<output message="tns:GetProducts2Response"/>
</operation>

<operation name="GetProductList">
<input message="tns:GetProductList3Request"/>
<output message="tns:GetProductList3Response"/>
</operation>
</portType>
+
<binding name="IROAGbinding" type="tns:IROAG">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="HelloWorld">
<soap:operation soapAction="urn:ROAGIntf-IROAG#HelloWorld" style="rpc"/>

<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ROAGIntf-IROAG"/>
</input>

<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ROAGIntf-IROAG"/>
</output>
</operation>

<operation name="HelloTo">
<soap:operation soapAction="urn:ROAGIntf-IROAG#HelloTo" style="rpc"/>

<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ROAGIntf-IROAG"/>
</input>

<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ROAGIntf-IROAG"/>
</output>
</operation>

<operation name="GetProducts">
<soap:operation soapAction="urn:ROAGIntf-IROAG#GetProducts" style="rpc"/>

<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ROAGIntf-IROAG"/>
</input>

<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ROAGIntf-IROAG"/>
</output>
</operation>

<operation name="GetProductList">
<soap:operation soapAction="urn:ROAGIntf-IROAG#GetProductList" style="rpc"/>

<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ROAGIntf-IROAG"/>
</input>

<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ROAGIntf-IROAG"/>
</output>
</operation>
</binding>

<service name="IROAGservice">

<port name="IROAGPort" binding="tns:IROAGbinding">
<soap:address location="http://roagcomputer:81/cgi-bin/TestWS.exe/soap/IROAG"/>
</port>
</service>
</definitions>