The JMS header fields and properties of an XMS message are mapped onto fields in the header structures of a WebSphere MQ message.
When an XMS application is connected to a WebSphere MQ queue manager, messages sent to the queue manager are mapped onto WebSphere MQ messages in exactly the same way that WebSphere MQ JMS messages are mapped onto WebSphere MQ messages in similar circumstances.
If the XMSC_WMQ_TARGET_CLIENT property of a Destination object is set to XMSC_TARGET_DEST_JMS, the JMS header fields and properties of a message sent to the destination are mapped onto fields in the MQMD and MQRFH2 header structures of the WebSphere MQ message. Setting the XMSC_WMQ_TARGET_CLIENT property in this way assumes that the application that receives the message can handle an MQRFH2 header. The receiving application might therefore be another XMS application, a WebSphere MQ JMS application, or a native WebSphere MQ application that has been designed to handle an MQRFH2 header.
If the XMSC_WMQ_TARGET_CLIENT property of a Destination object is set to XMSC_TARGET_DEST_MQ instead, the JMS header fields and properties of a message sent to the destination are mapped onto fields in the MQMD header structure of the WebSphere MQ message. The message does not contain an MQRFH2 header, and any JMS header fields and properties that cannot be mapped onto fields in the MQMD header structure are ignored. The application that receives the message can therefore be a native WebSphere MQ that has not been designed to handle an MQRFH2 header.
WebSphere MQ messages received from a queue manager are mapped onto XMS messages in exactly the same way that WebSphere MQ messages are mapped onto WebSphere MQ JMS messages in similar circumstances.
If an incoming WebSphere MQ message has an MQRFH2 header, the resulting XMS message has a body whose type is determined by the value of the Msd property contained in the mcd folder of the MQRFH2 header. If the Msd property is not present in the MQRFH2 header, or if the WebSphere MQ message has no MQRFH2 header, the resulting XMS message has a body whose type is determined by the value of the Format field in the MQMD header. If the Format field is set to MQFMT_STRING, the XMS message is a text message. Otherwise, the XMS message is a bytes message. If the WebSphere MQ message has no MQRFH2 header, only those JMS header fields and properties that can be derived from fields in the MQMD header are set.
For more information about mapping WebSphere MQ JMS messages onto WebSphere MQ messages, see WebSphere MQ Using Java.