@jws:jms-message Tag

Specifies XML maps for the message body of messages processed by a JMS control.

# Syntax

    @jws:jms-message
    	xml-map="JMSmessageXMLMap"

# Attributes

xml-map

Required. Specifies an XML document fragment (an XML map), optionally containing substitution tokens enclosed in curly braces ("{}"). The XML map must be delimited by "::". No default.

# Remarks

The following rules apply to this tag's use:

- Only one @jws:jws-message tag may appear within a single Javadoc comment block.

- Optionally may appear in front of a method in a CTRL file defining a JMS control.

- Optionally may appear in front of a callback in a CTRL file defining a JMS control.

On a method of a JMS control, tells the control to use the XML map to set values in the outgoing XML message body from one or more method parameters.

On a callback of a JMS control, tells the control to use the XML map to set one or more callback parameters from values in the incoming XML message body.

For an example, see Sending and Receiving XML Messages with a JMS Control.

# Example

The example below demonstrates use of the @jws:jms-message tag:

        /**
         * @jws:jms-message xml-map::
         *   <person>
         *     <identifier>{personID}</identifier>
         *   </person>
         * ::
         */
        public void sendID(String personID);

The body of the message sent when sendID is invoked will consist of the <person> XML document with the string value of personID substituted for {personID}.

Multiple properties may be included within the <property> element.

Individual property elements may not have child elements.

As with all XML maps, substitutions may be made using the {} syntax within the XML map. To learn about the general capabilities of XML maps, see Why Use XML Maps?

Related Topics

JMS Control: Using Java Message Service Queues and Topics from Your Web Service

Manipulating JMS Message Headers and Message Properties in a JMS Control

@jws:jms Tag

@jws:jms-header Tag

@jws:jms-property Tag