• 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

[Messaging Styles & Message Exchange Patterns] Leonard Richardson and Sam Ruby

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Leonard, Sam,

If we compare the RESTful Web Services with the traditional Web Services, would we be still having the 4 Messaging styles of rpc-literal, doc-literal, rpc-encoded and doc-encoded?? and what about the Message Exchange Patterns (MEP's), one-way, request-response, notification and solicit-response? OR do we introduce new styles and MEP's?

*********************
Regards,
Dinesh Sundrani
---------------
SCJP 1.5 [86%]
SCWCD [95%]
SCDJWS [98%]
*********************
 
author
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dinesh,

Messaging styles and message exchange patterns are concepts from SOAP,
and they're not used in RESTful analysis. Sam will know better than I,
but I'm pretty sure that describing HTTP in terms of the SOAP concepts
gives you document-literal for the messaging style and
request-response for the MEP.

Of course, you can implement other styles and MEPs on top of HTTP
(that's what SOAP does), but in RESTful design your thinking is
oriented around different concepts: resources, representations, etc.

Does this help?
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also note that even traditional (SOAP-based) web services are limited to the one-way and request-response messaging patterns. Because they use HTTP as a transport solicit-response and notification aren't directly supported.
 
Dinesh Sundrani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Leonard,

So the Web Service Client uses the available 4 verbs (below) for every noun.
GET - to fetch info
POST - to add info
PUT - to update info
DELETE - to remove info

Am in on the same page?


And

Yes, Peer!! I am aware of the fact that solicit-response & notification MEP's are not directly supported by SOAP over HTTP, we need to have some kind of callbacks and create corelation Id's to make it possible the asyncronous way.

*********************
Regards,
Dinesh Sundrani
---------------
SCJP 1.5 [86%]
SCWCD [95%]
SCDJWS [98%]
*********************
 
Leonard Richardson
author
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dinesh, yes, that's more or less right. There are some other auxilliary verbs like HEAD, and PUT can also be used to create new resources.
 
Dinesh Sundrani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Leonard for making it clear!!

Also one more thing regarding Idempotence of these Web Methods.

POST is not an Idempotent methods, so do we need to take care of "multiple-accidental-clicks-for-credit-card-purchase-order" kind of problems in the RESTFul web service code itself when we are using POST URL's to expose the service (resource), so that we are sure that we don't double charge the customer and loose out on any further businesses with him??

*********************
Regards,
Dinesh Sundrani
---------------
SCJP 1.5 [86%]
SCWCD [95%]
SCDJWS [98%]
*********************
 
author
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

do we need to take care of "multiple-accidental-clicks-for-credit-card-purchase-order" kind of problems in the RESTFul web service code itself when we are using POST URL's to expose the service (resource)



Short answer: yes. But the good news is that there are standard patterns for doing this.
 
Sam Ruby
author
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More related information was posted today by Joe Gregorio.
reply
    Bookmark Topic Watch Topic
  • New Topic