Re: [soapbuilders] SOAP request or WSDL problem
by Eric Rajkovic other posts by this author
Jan 29 2004 1:36PM messages near this date
[soapbuilders] SOAP request or WSDL problem
|
[soapbuilders] Apache Axis client passing complex types to Toolkit 3.0 web service
SERVICES Hi Scott,
I tried to consume your WSDL and to generate a payload from it without problems.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:updateLessComplexObject xmlns:ns1="urn:SoapTestsService" SOAP-ENV:encodingStyle=
"http://schemas.xmlsoap.org/soap/encoding/">
<lcObj xmlns:ns2="urn:soaptest" xsi:type="ns2:LessComplexObject">
<list xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array
" ns3:arrayType="ns2:SimpleObject[1]">
<item xsi:type="ns2:SimpleObject">
<valueOne xsi:type="xsd:string"> valueOne</valueOne>
<valueTwo xsi:type="xsd:string"> valueTwo</valueTwo>
</item>
</list>
</lcObj>
</ns1:updateLessComplexObject>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
you may want to give more information on the toolkit you are using to generate the client
code as the issue seems to be in the way the WSDL is consumed.
Changing the default namespace to be the same as the targetNamespace (tns in your WSDL)
may help you, if this has a specific meaning for the tool you used to generate the request.
Most likely, this will be a bug specific to your client utility.
eric
splunge_000 wrote:
> Hi gang,
>
> The following SOAP request is generated from my WSDL...
>
> <SOAP-ENV:Envelope xmlns:SOAP-
> ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-
> ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="urn:soaptest">
> <SOAP-ENV:Body>
> <m:updateLessComplexObject
> xmlns:m="urn:SoapTestsService" SOAP-
> ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <lcObj xsi:type="m0:LessComplexObject">
> <list xsi:type="SOAP-ENC:Array" SOAP-
> ENC:arrayType="SimpleObject[1]">
> <m0:item0
> xsi:type="m0:SimpleObject">
> <valueTwo
> xsi:type="xsd:string">String</valueTwo>
> <valueOne
> xsi:type="xsd:string">String</valueOne>
> </m0:item0>
> </list>
> </lcObj>
> </m:updateLessComplexObject>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> ...gives me the error "The value of
> the 'http://schemas.xmlsoap.org/soap/encoding/:arrayType' attribute
> must be namespace-qualified."
>
> Using the error as a clue, if I hand modify a single line of the
> SOAP request I can get it to work. Here's the line I modified; note
> that only two chars (the namespace qualification) are different from
> the original request above.
>
> <list xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="m0:SimpleObject
> [1]">
>
> I added "m0: to it to point to the correct namespace and it works!
>
> Ok, so here's the problem...I can't figure out how to modify my WSDL
> so that it generates the namespace qualification. Any ideas? Am I
> going about this the right way? Doesn't seem like it should be this
> difficult. Thanks, in advance.
>
> WSDL file is below.
>
> Scott
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="urn:SoapTestsService" xmlns:intf="urn:SoapTestsService"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns1="urn:soaptest"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="urn:SoapTestsService">
> <wsdl:types>
> <schema targetNamespace="urn:soaptest"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <import
> namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> <complexType
> name="LessComplexStringListObject">
> <sequence>
> <element name="list"
> nillable="true" type="impl:ArrayOf_xsd_string"/>
> </sequence>
> </complexType>
> <element name="LessComplexStringListObject"
> nillable="true" type="tns1:LessComplexStringListObject"/>
> <complexType
> name="LessComplexArrayListObject">
> <sequence>
> <element name="list"
> nillable="true" type="xsd:anyType"/>
> </sequence>
> </complexType>
> <element name="LessComplexArrayListObject"
> nillable="true" type="tns1:LessComplexArrayListObject"/>
> <complexType name="LessComplexObject">
> <sequence>
> <element name="list"
> nillable="true" type="impl:ArrayOf_tns1_SimpleObject"/>
> </sequence>
> </complexType>
> <complexType name="SimpleObject">
> <sequence>
> <element name="valueTwo"
> nillable="true" type="xsd:string"/>
> <element name="valueOne"
> nillable="true" type="xsd:string"/>
> </sequence>
> </complexType>
> <element name="LessComplexObject"
> nillable="true" type="tns1:LessComplexObject"/>
> </schema>
> <schema targetNamespace="urn:SoapTestsService"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <import
> namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> <complexType name="ArrayOf_xsd_string">
> <complexContent>
> <restriction
> base="soapenc:Array">
> <attribute
> ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> </restriction>
> </complexContent>
> </complexType>
> <complexType
> name="ArrayOf_tns1_SimpleObject">
> <complexContent>
> <restriction
> base="soapenc:Array">
> <attribute
> ref="soapenc:arrayType" wsdl:arrayType="tns1:SimpleObject[]"/>
> </restriction>
> </complexContent>
> </complexType>
> </schema>
> </wsdl:types>
> <wsdl:message name="getLessComplexArrayListObjectResponse">
> <wsdl:part
> name="getLessComplexArrayListObjectReturn"
> type="tns1:LessComplexArrayListObject"/>
> </wsdl:message>
> <wsdl:message name="updateLessComplexObjectRequest">
> <wsdl:part name="lcObj"
> type="tns1:LessComplexObject"/>
> </wsdl:message>
> <wsdl:message
> name="updateLessComplexStringListObjectResponse">
>
> </wsdl:message>
> <wsdl:message name="getLessComplexObjectResponse">
> <wsdl:part name="getLessComplexObjectReturn"
> type="tns1:LessComplexObject"/>
> </wsdl:message>
> <wsdl:message name="getLessComplexArrayListObjectRequest">
>
> </wsdl:message>
> <wsdl:message
> name="updateLessComplexArrayListObjectResponse">
>
> </wsdl:message>
> <wsdl:message
> name="updateLessComplexStringListObjectRequest">
> <wsdl:part name="lcObj"
> type="tns1:LessComplexStringListObject"/>
> </wsdl:message>
> <wsdl:message name="getLessComplexStringListObjectResponse">
> <wsdl:part
> name="getLessComplexStringListObjectReturn"
> type="tns1:LessComplexStringListObject"/>
> </wsdl:message>
> <wsdl:message name="getLessComplexStringListObjectRequest">
>
> </wsdl:message>
> <wsdl:message name="updateLessComplexObjectResponse">
>
> </wsdl:message>
> <wsdl:message name="updateLessComplexArrayListObjectRequest">
> <wsdl:part name="lcObj"
> type="tns1:LessComplexArrayListObject"/>
> </wsdl:message>
> <wsdl:message name="helloResponse">
> <wsdl:part name="helloReturn" type="xsd:string"/>
> </wsdl:message>
> <wsdl:message name="helloRequest">
>
> </wsdl:message>
> <wsdl:message name="getLessComplexObjectRequest">
>
> </wsdl:message>
> <wsdl:portType name="SoapService">
> <wsdl:operation name="hello">
> <wsdl:input name="helloRequest"
> message="impl:helloRequest"/>
> <wsdl:output name="helloResponse"
> message="impl:helloResponse"/>
> </wsdl:operation>
> <wsdl:operation
> name="getLessComplexStringListObject">
> <wsdl:input
> name="getLessComplexStringListObjectRequest"
> message="impl:getLessComplexStringListObjectRequest"/>
> <wsdl:output
> name="getLessComplexStringListObjectResponse"
> message="impl:getLessComplexStringListObjectResponse"/>
> </wsdl:operation>
> <wsdl:operation
> name="updateLessComplexStringListObject" parameterOrder="lcObj">
> <wsdl:input
> name="updateLessComplexStringListObjectRequest"
> message="impl:updateLessComplexStringListObjectRequest"/>
> <wsdl:output
> name="updateLessComplexStringListObjectResponse"
> message="impl:updateLessComplexStringListObjectResponse"/>
> </wsdl:operation>
> <wsdl:operation name="getLessComplexArrayListObject">
> <wsdl:input
> name="getLessComplexArrayListObjectRequest"
> message="impl:getLessComplexArrayListObjectRequest"/>
> <wsdl:output
> name="getLessComplexArrayListObjectResponse"
> message="impl:getLessComplexArrayListObjectResponse"/>
> </wsdl:operation>
> <wsdl:operation
> name="updateLessComplexArrayListObject" parameterOrder="lcObj">
> <wsdl:input
> name="updateLessComplexArrayListObjectRequest"
> message="impl:updateLessComplexArrayListObjectRequest"/>
> <wsdl:output
> name="updateLessComplexArrayListObjectResponse"
> message="impl:updateLessComplexArrayListObjectResponse"/>
> </wsdl:operation>
> <wsdl:operation name="getLessComplexObject">
> <wsdl:input
> name="getLessComplexObjectRequest"
> message="impl:getLessComplexObjectRequest"/>
> <wsdl:output
> name="getLessComplexObjectResponse"
> message="impl:getLessComplexObjectResponse"/>
> </wsdl:operation>
> <wsdl:operation name="updateLessComplexObject"
> parameterOrder="lcObj">
> <wsdl:input
> name="updateLessComplexObjectRequest"
> message="impl:updateLessComplexObjectRequest"/>
> <wsdl:output
> name="updateLessComplexObjectResponse"
> message="impl:updateLessComplexObjectResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="rpcrouterSoapBinding"
> type="impl:SoapService">
> <wsdlsoap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="hello">
> <wsdlsoap:operation/>
> <wsdl:input>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation
> name="getLessComplexStringListObject">
> <wsdlsoap:operation/>
> <wsdl:input>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation
> name="updateLessComplexStringListObject">
> <wsdlsoap:operation/>
> <wsdl:input>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getLessComplexArrayListObject">
> <wsdlsoap:operation/>
> <wsdl:input>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation
> name="updateLessComplexArrayListObject">
> <wsdlsoap:operation/>
> <wsdl:input>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getLessComplexObject">
> <wsdlsoap:operation/>
> <wsdl:input>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="updateLessComplexObject">
> <wsdlsoap:operation/>
> <wsdl:input>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:SoapTestsService"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="SoapTestsService">
> <wsdl:port name="rpcrouter"
> binding="impl:rpcrouterSoapBinding">
> <wsdlsoap:address
> location="http://161.211.145.238/NASApp/soap/rpcrouter"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
>
>
> -----------------------------------------------------------------
> This group is a forum for builders of SOAP implementations to discuss implementation and i
nteroperability issues. Please stay on-topic.
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/soapbuilders/
>
> To unsubscribe from this group, send an email to:
> soapbuilders-unsubscribe@[...].com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
-----------------------------------------------------------------
This group is a forum for builders of SOAP implementations to discuss implementation and int
eroperability issues. Please stay on-topic.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/soapbuilders/
To unsubscribe from this group, send an email to:
soapbuilders-unsubscribe@[...].com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Thread:
Splunge_000
Eric Rajkovic
|