my dog learned polymorphism
The moose likes Web Services and the fly likes How to find Document style or RPC from SOAP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "How to find Document style or RPC from SOAP" Watch "How to find Document style or RPC from SOAP" New topic
Author

How to find Document style or RPC from SOAP

satya ganesh
Greenhorn

Joined: Jul 14, 2008
Posts: 7
In SOAP message, I believe its not possible to mention whether its a Document style or RPC..

Is it Possible to figure out whether it is a Document style or RPC style of messaging only by looking at the SOAP message?
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
In a document style SOAP message that follows the WS-I Basic Profile, the SOAP body may only contain one XML fragment.
This XML fragment can be validated in its entirety, which means that the root element of the fragment belongs to some namespace.
With RPC style, the root element will be an element which corresponds to the name of the operation invoked and parameters to the operation, which are sub-elements of the root element, will thus be inside this element.
The root element in an RPC request is not described in the WSDL and need thus not belong to the same namespace as the parameters to the RPC operation.
So, at least in theory, it should be possible to tell the difference between a Document style and a RPC style SOAP message by looking at the namespace of the root element of the payload of the SOAP message.
Hope this helps and that I got this message right, writing it in a hurry!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to find Document style or RPC from SOAP
 
Similar Threads
SOAP Vs REST
encodingStyle attribute value
calling asynchronous web service synchronously
What style should i use RPC or Document for thsi scenario?
Different RPC Engines