SOAP encoding problem
Eduardo Lobo <[email protected]> Fri, 10 Jun 2005 17:18:40 -0600
| Newsgroups | gmane.text.xml.soap.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have a problem when send a request to a WebService that receive
messages in this format:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<StartTransaction xmlns="http://www.MySite.com">
<Param1>string</Param1>
<Param2>string</Param2>
<Param3>int</Param3>
</StartTransaction>
</soap:Body>
</soap:Envelope>
But when I build and send the request using SOAP, it send something like
this:
<<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope*/*"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:StartTransaction xmlns:ns1="http://www.MySite.com*/*"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding*/*">
<Param1 xsi:type="xsd:string">value1</Param1>
<Param1 xsi:type="xsd:string">value12</Param1>
<Param1 xsi:type="xsd:int">1</Param1>
</ns1:StartTransaction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
And I got this Exception message: No Deserializer found to deserialize a
'http://www.MySitecom:StartTransactionResult' using encoding style 'null'.
This is the code that I'm using:
Call call = new Call();
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
call.setTargetObjectURI("http://www.MySite.com/");
call.setMethodName("StartTransaction");
// I set parameters encoding to null
*As you can see, the namespaces that SOAP build are distinct to the
namespaces that I need send the request (see WebService format message),
I think that could be the problem.
But I don't know how to change them.
*
*Any help will be very appreciated.*
*Thanks.*