SOAP Envelope/Encoding using Axis 1.2

A

almousawi

No sure if i am using the write group. My 2 questions are:
1. How can i know the exact soap message being sent (how to print
it).
It seems the server is getting an envelope tag appended twice to my
message.

2.I am trying to use SOAP Axis 1.2 to connect to non-java service.
When I use the code below, I keep getting Error:
aultDetail:
{http://xml.apache.org/axis/}stackTrace:
SOAP envelope validation error. Envelope element doesn't have
SOAP 1.1 encoding attribute or requested encoding is not supported.
..........


Call call = (Call) service.createCall();
call.setEncodingStyle("SOAP-ENC=\"http://schemas.xmlsoap.org/soap/
encoding/\"");
SOAPBodyElement[] input = new SOAPBodyElement[1];
Element payload = buildInputQuery(queryFileName);
input[0] = new SOAPBodyElement(payload );//inputQuery);
this.writeDOMDocument(payload.getOwnerDocument(), System.out);
Vector elems = (Vector) call.invoke( input );


==============
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="somefile.wsdl">
<SOAP-ENV:Header>
<ns1:Login xsi:type="ns1:ATSPA_Login" SOAP-
ENV:mustUnderstand="1">
<username>USERNAME</username>
<pwd_hash>PASSWORD_HASH</pwd_hash>
</ns1:Login>
</SOAP-ENV:Header>
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/
soap/encoding/">
<ns1:GetAccountAddress>
<account_id xsi:type="xsd:integer">222</account_id>
</ns1:GetAccountAddress>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top