There has been some confusion about whether you can determine the Message Exchange Pattern (MEP) by looking at the message or not.
First some background. A MEP is part of a contract and to first approximation is independent of binding details like transport. For a simple MEP, a rich transport is dumbed down to provide exactly the MEP; for a rich MEP, a simple transport is built up to provide the MEP. Limiting the HTTP response for one-way (no fault) is an example of the former; defining a second UDP message to the source IP and port for request-response, the latter. Of course, there may be MEP–transport pairs which have no practical scenario or definition.
Here's the thinking. Drawing an analogy to an XML instance, the metadata for the instance (e.g., XML Schema) indicates what content is defined and whether it is required or optional; the instance itself may fail to include required content or may include additional content; the schema tells you the former is an error and gives an interpretation for the latter. (To be clear, I am not recommending the use of xs:element/@default!)
Applying this analogy to a MEP, the metadata (e.g., WSDL) indicates which messages are defined and whether they are one-way, request-response, optional, etc. A request message may fail to include a
WS-Addressing[reply endpoint] property, or a one-way message may include a
[reply endpoint], but neither changes the MEP the message is part of. The MEP tells you what the
[reply endpoint] for the former is and gives an interpretation (error?) for the latter.
Now the punch line with a mnemonic. A service does not need an individual message to explicitly describe the MEP; a service makes its own determination about a MEP and presumably reflects that in the metadata it publishes. The specific means the service uses to do this are hidden, similar to how the service "dispatches" the message, though both are likely to be based on the value of the
WS-Addressing[action] property or /s:Envelope/s:Body/*.
The mnemonic? Metadata Explains (message) Properties.
Posted
Aug 05 2005, 02:05 PM
by
jeffrey-schlimmer