Difference between Message and RPC based Web Services ?
Joined: May 10, 2002
What is the difference between Message and RPC based Web Services ?
Joined: Oct 31, 2003
Well, that's become kind of difficult to answer, but in general an document service exchanges, well XML documents. An RPC service exchange parameterized values. So if you have a complex purchase order you want to deliver from one endpoint to another, you'll probably want to use document. If you want invoke a service with a limited amount of input and output, than you may want to use RPC. DON'T USE RPC/ENCODED. It doesn't work well. Stick with Document/Literal or RPC/Literal - these concepts are explained in more detail in my and other peoples books. A lot of people equate RPC and Document messaging as synonymous with request/reply and asynchronous messaging respectively. Don't make the same mistake. Document and RPC refers to the packaging of the payload, not the interaction of the communicating parties. You can do RPC as request/reply or async and you do Document as async or request/reply. In reality, today everyone is using HTTP for web services, which is a request/reply protocol, but a reply can just be a simple "message received" reply, which doesn't contain any data. In other words, the fact that HTTP is actually request/reply doesn't mean it can't be used as the underlying protocol for asynchronous messaging. This is probably more confusing than helpful, but it how these things work. Did you know that most MOM products use a request/reply protocol under the asynchronous semantics of the programming model? The request/reply is used to confirm that the message broker received the message - other wise you wouldn't have any idea if it was sent successfully or not.