Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

SOAP Envelope/Encoding using Axis 1.2

Thread view: 
almousawi@gmail.com - 10 Oct 2007 09:11 GMT
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>
Mark Clements - 13 Oct 2007 17:45 GMT
> 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).

Use the TCP monitor that comes with Axis.

http://ws.apache.org/axis/java/user-guide.html#AppendixUsingTheAxisTCPMonitorTcpmon

Mark


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.