@jws:jms-header Tag

In a JMS control, specifies the XML map used to translate between JMS control Java method and callback parameters and JMS message headers.

Syntax

@jws:jms-header
	xml-map="JMSheaderXMLMap"

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 "::" and must include <header> as the outermost element.

No default.

Remarks

The following rules apply to this tag's use:

On a method of a JMS control, tells the control to use the XML map to set values in the outgoing XML message headers 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 headers.

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

Example

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

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

The message sent when sendID is invoked will include the JMS message header command with the (hard-coded) value GetPerson.

The outermost element must be <header>. Multiple headers may be included within the <header> element. Each member identifies a JMS message header with a name that is the name of the element name and a value that is the value of the 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-message Tag

@jws:jms-property Tag