[Users] Managing SOAP Header with Petals
meljai
mohammed.eljai at ebmwebsourcing.com
Wed Mar 16 10:55:58 CET 2011
Hi Seb,
The SOAP request that you posted corresponds to the response
Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:envTechOut href="#id0" xmlns:ns1="TestHeaderWS"/>
</soapenv:Header>
<soapenv:Body>
<ns2:additionResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="TestHeaderWS">
<additionReturn xsi:type="xsd:int">2</additionReturn>
</ns2:additionResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:enveloppeTechType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3="TestHeaderWS">
<identifiant xsi:type="xsd:string">id</identifiant>
<codeErr xsi:type="xsd:int">-1</codeErr>
<messErr xsi:type="xsd:string">messErr</messErr>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
I assume that your request is
Code:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tes="TestHeaderWS">
<soapenv:Header>
<envTechIn xsi:type="tes:enveloppeTechType">
<identifiant xsi:type="xsd:string">test</identifiant>
<codeErr xsi:type="xsd:int">1</codeErr>
<messErr xsi:type="xsd:string">test</messErr>
</envTechIn>
</soapenv:Header>
<soapenv:Body>
<tes:addition soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<a xsi:type="xsd:int">1</a>
<b xsi:type="xsd:int">2</b>
</tes:addition>
</soapenv:Body>
</soapenv:Envelope>
I also assume that you used SOAPUI to generate it.
The header part of this request is not associated with any namespace (it might be a bug in SOAPUI).
So, you have to add the namespace to envTechIn element of the header part.
Code:
<envTechIn xsi:type="tes:enveloppeTechType" xmlns="TestHeaderWS">
instead of
Code:
<envTechIn xsi:type="tes:enveloppeTechType">
After this modification, you should be able to call your web service via BC-SOAP.
Hope that help you,
Mohammed.
-------------------- m2f --------------------
Subscribe/Unsubscribe emails notifications.
Response to this email will be posted on the Petals forum.
Please delete the existing text before responding :)
Read the topic online:
http://forum.petalslink.com/viewtopic.php?p=30780#30780
-------------------- m2f --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/057f2abf/attachment.htm>
More information about the Users
mailing list