Hello Brian,
> Many thanks for your reply. I now understand the scenario. However, I have yet another question regarding the hypermedia controls. How does the user know how to use the payment activity for example without knowing about return types and operations within it.
As a customer you get a rel value whose semantics you know because you understand the application/restbucks+xml media type. If you don't understand that, you can't use the service.
> i do not understand what advantage this approach has over having multiple URIs for each activity.
There are multiple URIs for all the things (workflows, entities) in Restbucks, but the client doesn't need to compute them, the server does. The client need only understand the semantics of the contract (in this case just the media type but in general the media type any additional hypermedia controls layered on top).
As an aside, think how annoying/useless it would be if you had to compute the URIs when you're browsing the Web, rather than have the servers do it.
> I might be missing something here but short of auto generating the stubs such as was explained using the WADL2Java i don't see what benefit this approach offers, other than the advantage of providing a single URI as opposed to many.
This definitely isn't about auto-generating stubs, it's about having a URI for important things. The shop has a URI (
http://restbucks.com), the "counter" has a URI (
http://restbucks.com/orders) and each order has a URI containing URIs that reference the line items. This is as it should be on the Web: important things get named (that is, they have URIs).
Personal opinion: WADL is lame, avoid.
Jim