• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis RPC vs Document style web service

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

Regards
Deepak
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 !!

 
kalra kalra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic