Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Procedure and Document style messaging

 
Sachet Varma
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Other than the syn and async mode , to determine when to use which ( RPC - sync , doc/lit - async)
what other distinctions can be made?

For instance , if a certain web service can return multiple types of documents depending on certain input conditions , would not doc/literal be considered better over RPC since you can send over a complete document , in other words , an XML which doesnt have to be type specific?

Do let me know if my understanding is right.

Thanks
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
First of all, Document versus RPC:
If you are only returning a document as a result of a web service invocation with one or more simple parameters, an RPC/Literal web service may also be appropriate.
If you are submitting an entire document, for instance a travel itinerary, to be processed, and later returned, by a web service then Document/Literal is more appropriate.
Document/Literal is also more appropriate for coarse-grained services which are designed for extensibility. Such services can accept a number of different documents, using the xsi:anyType. Adding new document types does not change the interface of the web service.

Second, asynchronous versus synchronous:
Document/Literal web service does not necessarily have to be asynchronous. Long running services and services that require human interaction are likely candidates to be asynchronous.
Remember also that there is a difference between asynchronous invocation of a web service and an asynchronous web service. In the first case, the service is synchronous and a thread in the client is dispatched to wait for the response while the thread issuing the request can continue to run.
Hope this sheds some light!
 
Sachet Varma
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ivan. That made sense
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic