By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,589 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,589 IT Pros & Developers. It's quick & easy.

Namespace not included in SoapClient Request XML

P: 3
We are using WSDL in soapclient to access the java web service.The soapclient request is not formed as required by the service.

Namespace is not included in one ComplexType element(<GSTBTReq>) in request XML which causes the problem in getting response from the service.

Request XML generated by SoapClient:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://abc.com/GBTSTo/GBTSTReq/01" xmlns:ns2="http://abc.com/GBTST">
<SOAP-ENV:Body>
<ns2:gBlTST>
<GSTBTReq> <!-- TODO : NAMESPACE DOES NOT GET MAPPED HERE -->
<CustomerNumber>123</CustomerNumber>
<Unit>ABC</Unit>
</GSTBTReq>
</gBlTST>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Following is the part of WSDL to create soapclient.

<s:schema elementFormDefault="qualified" targetNamespace="http://abc.com/GBTST" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
<s:import namespace="http://abc.com/GBTST/GBTSTReq/01"/>
<s:import namespace="http://abc.com/GBTST/GBTSTResp/01"/>
<s:element name="gBTST">
<s:complexType>
<s:sequence>
<s:element ref="ns:GSTBTReq"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name= "gBTSTResp">
<s:complexType>
<s:sequence>
<s:element ref="ns1:GSTBTResp"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>

<s:schema targetNamespace="http://abc.com/GBTST/GBTSTReq/01" xmlns:common="http://abc.com/Common/01" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:req="http://abc.com/GBTST/GBTSTReq/01" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<s:import namespace="http://abc.com/Common/01"/>
<s:simpleType name="CustomerNumber">
<s:restriction base="xsd:integer"/>
</s:simpleType>
<s:simpleType name="Unit">
<s:restriction base="xsd:string">
<s:enumeration value="ABC"/>
</s:restriction>
</s:simpleType>
<s:element name="GSTBTReq">
<s:complexType>
<s:sequence>
<s:element name="CustomerNumber" nillable="false" type="req:CustomerNumber"/>
<s:element name="Unit" nillable="false" type="req:OperatingUnit"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
Nov 14 '06 #1
Share this Question
Share on Google+
1 Reply


ronverdonk
Expert 2.5K+
P: 4,258
Maybe you would get more attention if you didn't make a mess of the posted code. I surely do not feel tempted to read it.

Read the Posting Guidelines before you put anything in here. Take special notice of the part saying that you must enclose you code within code, php or html tags.!!

Ronald :cool:
Nov 14 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.