wood burning stoves 2.0*
The moose likes Web Services and the fly likes Conversion of message to SOAP in web service 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 "Conversion of message to SOAP in web service" Watch "Conversion of message to SOAP in web service" New topic
Author

Conversion of message to SOAP in web service

Krithi Raghu
Greenhorn

Joined: Jan 15, 2008
Posts: 23
Hi,
I am a new bie to web services. I have developed a web service that takes as input two parameters and returns a string. My web service is working fine.

I just wanted to identify the flow of my web service. So, I had set the verbose value to true in my client and passed my parameters to my web service.

when the client is run, the parameters are converted into SOAP message by default and then sent to the web service.
This SOAP message is in the form of an XML.

Now my doubt is - when we say we can pass an XML to a web service, does it actually means the SOAP
message that is sent or is it that we can send a XML file itself to the web service. when we send an xml how is it wrapped into a SOAP message.

Sorry if this is a very basic question. I tried to google this but could not get a clear answer.

Thanks in advance
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2921
    
    5
Originally posted by Murugeson Shanthi:
Now my doubt is - when we say we can pass an XML to a web service, does it actually means the SOAP message that is sent or is it that we can send a XML file itself to the web service. when we send an xml how is it wrapped into a SOAP message.


If you are communicating with a SOAP web service then any message to/from the SOAP web service is a SOAP envelope (or MIME envelope wrapping the SOAP envelope if the service supports attachments). So if you are sending arbitrary XML to a SOAP web service then that XML (payload) will be inside a SOAP envelope.

Other non-SOAP web services can accept/send XML without a SOAP envelope. This is usually referred to as POX over HTTP (Plain Old XML) but it isn't SOAP.
[ February 18, 2008: Message edited by: Peer Reynders ]
Krithi Raghu
Greenhorn

Joined: Jan 15, 2008
Posts: 23
Thanks a lot Peer.

I am currently working in weblogic6.1 SP6 and would like to pass an xml to my web service. But i read in the docs that a non built-in data type is not supported in weblogic 6.1 and serialization is also not possible. Just to confirm... is it possible to send a xml file to a web service in weblogic 6.1?

If I need to send an xml how could it possibly be done? I am totally confused with this...

Please help me.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2921
    
    5
Weblogic 6.1 web service support is pretty much outdated.
Overview of WebLogic Web Services

It seems to be based on a library that is similar to to Apache SOAP (which isn't even available for download any more). These libraries were pretty much assuming that you were building/parsing the SOAP message on the spot; so using it to send/receive an XML document could possibly be quite tedious.

One alternative is to try to get Axis 1.x working with it (There are some issues with WL 8.1 Step 2: Setting up the libraries: WebLogic 8.1, don't know about 6.1) and use its Message service style.

The other alternative is to find an SAAJ library (look in the Axis 1.x distribution) that works with WL 6.1 and build an SAAJ Servlet as described in SAAJ (pdf) (from Java Web Services in a Nutshell).

Either of these will take some determination to get working. Just google for WebLogic 6.1 SAAJ and WebLogic 6.1 Axis to see the various problems that people have encountered and how they have worked around them.
[ February 20, 2008: Message edited by: Peer Reynders ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Conversion of message to SOAP in web service
 
Similar Threads
Diff b/w RPC / Document / MSG Style
How to create XML from XSD dynamically at runtime
Change address location webservice
Free XML Signature/Encyption Implementing Web Services
wsdl and xsd.