This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Regarding the Soap Message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Regarding the Soap Message" Watch "Regarding the Soap Message" New topic
Author

Regarding the Soap Message

KrishnaPrasad raghavan
Ranch Hand

Joined: Oct 28, 2008
Posts: 46
Hi,

I would like to know if the Soap message is simply a string that is converted into a byte array and sent across the Http or is it a SOAP Object which is then serialized into a Byte array. Lets say for instance, I have the following code.



This returns me the complete SOAP Message. For example
<SOAP-ENV:Envelope..
...
><SOAP-ENV:Envelope/>
and I convert the String to a byte array,



I have sent this byte message to a Web service consumer using a http connection and seen a proper response coming back. So I assume the message can simple be a string which then gets converted into a byte array.
We don't really have to convert the message to a SOAPMessage ??.

Please let me know if my understanding is correct.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
A "SOAP message" is just an XML-based group of text characters organized in a specifc way. It is not a Java object.
A programmer can create a "SOAP message" with shell script commands, a text editor, COBOL code, Java code, Perl code, etc.
When a "SOAP message" is sent it is converted to bytes. The XML-based text is converted to bytes, not a Java object.



These statements are code that help create "SOAP messages." They are not the required for anything and simply present one option for generating a "SOAP message" with an object-oriented program.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding the Soap Message
 
Similar Threads
Different Behavior between SAAJ Implementations (Axis2 and glassfish)
SAAJ - Empty SOAP Response / Null Pointer Exception
SOAP Fault for SOAP Action property
Query regarding SAAJ API
SoapConnection timeout