This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
As we know RPC style use soap encoding (Java <-> XML <-> Java) where as Dcoument style use literal encoding.
1.Can somene please explain me what's the difference between two
2. How does Dcoument style web service gives better performance
3. I have generated the wsdl(using axis) for both document and rpc style web service i.e. style="rpc" and style="document" in server-config.wsdd. I have noticed the difference the way it generates the soap messgae. In case of RPC, soap request message conatin operation name where as in case document style , soap request message does not contain operation name. this is the only difference I can figure it out
Does Axis do something different for document style web service i.e. in terms of serialization/deserialization, parsing etc so that document style web service do have better performance
RPC makes sense when you want to convert an existing function to a web service call. Essentially you give provision to switch back and forth between java & xml to expose your methods for a web service call. This is usually the case when you migrate existing functionality as such to web services (which IMHO is a bad idea anyway !)
Document based services are used when you pack together a set of data as xml and send it over to the server, which does a set of functionality and give you back some data as xml. For example, add goods to inventory, update an order processing system, send mail etc (maybe as an asynchronous process) Here you are more concerned about grouping business rather than migrating your java functions as web services.
Performance improvements of one over the other? hmm.. none - if the same functionality involved is the same.
Folks, correct me if I'm wrong !!
Joined: Jan 10, 2007
RPC style web service uses SOAP encoding whereas Document style web service use literal encoding.
In case of SOAP encoding each element in the SOAP body includes the XML Schema definition type of the data element.SOAP encoding with the embedded data types increases the amount of data transferred in the Web services request. Thus it increase the time to parse the data.
In case of Document encoding indicates that the rules to encode and interpret the SOAP Body are specified by a XML schema. THus each element does not contain data type. So payload size is less in this case