DataPower as the consumer of EMS map messages
The DataPower® service acts as a consumer of TIBCO EMS map messages when a service is configured with a TIBCO EMS handler.
The handler gets the incoming message that is converted to an XML stream of a predefined format.
The converted EMS message contains the request header DP_JMSMessageType: map
name-value pair to provide information about the message format. Document processing and XSLT
extension functions read and transform the converted message as an XML request.
The TIBCO EMS map message requests must conform to the following XML
schema.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Message element -->
<xs:element name="Message">
<xs:complexType>
<xs:sequence>
<xs:element ref="Field" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="unique-name">
<xs:selector xpath="Field"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<!-- Field element -->
<xs:element name="Field">
<xs:complexType mixed="true">
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:choice minOccurs="0">
<xs:element ref="Message" maxOccurs="1"/>
<xs:element ref="Array" maxOccurs="1"/>
</xs:choice>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="bool"/>
<xs:enumeration value="byte"/>
<xs:enumeration value="char"/>
<xs:enumeration value="short"/>
<xs:enumeration value="int"/>
<xs:enumeration value="long"/>
<xs:enumeration value="float"/>
<xs:enumeration value="double"/>
<xs:enumeration value="bytes"/>
<xs:enumeration value="string"/>
<xs:enumeration value="short_array"/>
<xs:enumeration value="int_array"/>
<xs:enumeration value="long_array"/>
<xs:enumeration value="float_array"/>
<xs:enumeration value="double_array"/>
<xs:enumeration value="map_message"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
<!-- Array element -->
<xs:element name="Array">
<xs:complexType>
<xs:sequence>
<xs:element ref="Element" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- Element of array-->
<xs:element name="Element">
<xs:complexType mixed="true">
<xs:sequence/>
</xs:complexType>
</xs:element>
</xs:schema>
The following example shows the XML representation of a TIBCO EMS map
message.
<Message>
<!-- nested map message #1 -->
<Field name="map1" type="map_message">
<Message>
<Field name="an_empty1_double_array" type="double_array"/>
<Field name="an_empty1_long_array" type="long_array"/>
<Field name="an_empty1_short_array" type="short_array"/>
<Field name="floaty" type="float">100000.00</Field>
<Field name="map11" type="map_message">
<Message>
<Field name="int_array" type="int_array">
<Array>
<Element>100000</Element>
<Element>2147483647</Element>
<Element>-2147483647</Element>
<Element>2147483648</Element>
<Element>-2147483649</Element>
<Element></Element>
<Element>BOGUS</Element>
</Array>
</Field>
<Field name="map111" type="map_message">
<Message/>
</Field>
<Field name="stringy" type="string">This is a quick brown fox.</Field>
</Message>
</Field>
<Field name="map12" type="map_message">
<Message/>
</Field>
</Message>
</Field>
<!-- nested map message #2 -->
<Field name="map2" type="map_message">
<Message>
<Field name="booly" type="bool">True</Field>
<Field name="map21" type="map_message">
<Message/>
</Field>
<Field name="the_bytes" type="bytes">RnJvbSBNb3Njb3cgV2l0aCBMb3ZlCg==</Field>
</Message>
</Field>
<!-- one short array -->
<Field name="short_array" type="short_array">
<Array>
<Element>5146</Element>
<Element>32767</Element>
<Element>-32767</Element>
<Element>32768</Element>
<Element>-32769</Element>
<Element></Element>
<Element>BOGUS</Element>
</Array>
</Field>
<!-- one short field -->
<Field name="shorty" type="short">5146</Field>
</Message>