• 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

document style versus procedural style?

 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I know that RPC style means you have an intuitive message instance that is easy to read and that document style offers some advantages regarding validation.

However taking a step back and looking at from a higher level what's the difference.

Let's say you have a web service which has to accept membership application forms.
The forms can contain many different permutation of many different fields.

Does an RPC approach mean you have one method with lots of parameters - one for each field? And a document approach mean you only have one parameter: the document. And the document wraps all the fields?

so can we say a document approach makes more sense when you have a lot of parameters that would be nice to wrap and a rpc approach makes sense when you have lots of methods with very few parameters?

I'm interesting in your opinions!

 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Luke,

I have to agree that, I'm also one of those who gets confused between RPC vs Document style quite often. But upon lot of discussions and readings, I came to a conclusion that, Document style is more benefited when you have a huge document that can be validated against some schemas and may take a longer time to process. Not necessarily asynchronous, but yes, it may involve lot of validations, parsing etc. This kind of service invocation is applicable in the example you quoted below, where you need to validate the application form against several xsds etc.

On the other hand, RPC is more of quick operations.... say calculator (may not be a good example) but the underlying principle here is use RPC if you think that operation is quick and does not involve lot of validations against the validity of the incoming SOAP request on the other hand, use Document, if you need validation against schemas for enforcing business rules.

I think this may be the reason why Document style is preferred over RPC in SOAP based WS, as usual business usecases are B2B transactions, which involves lot of business rules to be validated before processing the request.

But I believe, this confusion would still continue for me too
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic