02 - SOAP Message Exchange

SOAP Message Exchange

As we have previously defined, SOAP 1.2 is a messaging framework for transporting information defined in an XML format between a SOAP initiator and a SOAP receiver.

The simplest pattern that allows this message exchange is the request-response pattern, but there could be many more scenarios where multiple message exchange is needed between these SOAP nodes (initiator and receiver). We will cover two of the most common patterns that can be defined with SOAP.

Conversational Message exchanges

Many SOAP message exchange could be modeled in this pattern, as an exchange of SOAP messages in a form of a conversation, sending messages back and forth in this conversation.

This could be achieved by including information on the SOAP body that the originator of the SOAP message could then take and refine the information with a new SOAP message request and so on.

Remote Procedure Calls

One of the mail goals for SOAP was to ease the exchange of messages that maps to definitions or invocations of methods/procedures in the most commonly used programming languages. So SoAP defines a uniform representation for remote procedure call requests and responses (RPC).

You should use the SOAP encodingStyle attribute to indicate the encoding style for the RPC representation.

To invoke a remote procedure call the following information must be provided:

- The address of the target SOAP node

- The name of the procedure or method

- The identities and values of the arguments passed for the procedure or method.

The response to the request will include the processed information by the procedure or method.

We will see more about RPC in the examples for this tutorial.

Like us on Facebook