IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Enterprise Service Bus programming > Mediation Flow Component > Service Message Objects

SMO structure

All SMOs have the same basic structure. The structure consists of a data object called a ServiceMessageObject, which contains other data objects representing the header, body, attachments, and context data.

The structure of a SMO is shown in Figure 1 .

Figure 1. Overview of SMO structure. The context, headers, body and attachments of a ServiceMessageObject

The ServiceMessageObject Java™ interface provides access to the message headers, message body, message context and message attachments.


SMO headers

The SMO headers carry header information for different types of messages.

The SMO headers contain information that originates from a specific import or export binding (a binding specifies the message format and protocol details). Messages can come from a number of sources, so the SMO has to be able carry different kinds of message header. The kinds of message headers include:


SMO context

The SMO context lets mediation primitives pass data that is not part of the message payload, between themselves.

SMO context objects are either user-defined or system-defined.


System-defined context objects

The following context objects are system-defined:


User-defined context objects

User-defined context objects can be used to store properties that mediation primitives use later in the flow.

The following context objects are user-defined:


SMO body

The body of a SMO is a business object that is defined by reference to a Web Services Description Language (WSDL) message.

For each part defined by the WSDL message there is one element under the SMO body. The contents of the SMO elements are of the structure of the WSDL part definition. The element names depend upon the kind of WSDL message that the SMO is defined from.


SMO attachments

The SMO contains an attachments element for each attachment associated with a SOAP message.

The SMO attachments element let you send and receive SOAP messages that have attachments of various types.

You might want to send SOAP messages with attachments and let the attachments pass through the mediation flow unchanged, or you might want to create new attachments, perhaps from information in the message or from an external source.

Service Message Objects