XML listener commands

The Transaction Server defines an XML command and response format that external enterprise applications can use to send and receive messages. The commands work in conjunction with the listener feature.
The enterprise application can use these commands to send parameters that will be forwarded to the listener trigger and also receive parameters that are sent back to the enterprise after completion of the listener trigger.
Each command must begin with the following process instruction:

<?xml version="1.0" encoding="iso-8859-1" ?>

XML listener request payload

A listener request payload follows a predefined XML format. The request must specify a listener map identifier that the listener will use to locate the appropriate listener map definition. This definition will be used to map the items specified in the request payload to an internal request that will trigger the listener trigger.

For more information see ListenerRequest below.

The following is for the programmer who is experienced with message queuing software and wants to deliver an enterprise application that can interact with the node via these listener commands.

ListenerRequest

<?xml version="1.0" encoding="iso-8859-1" ?>
<ListenerRequest seq="100" >
<ListenerMap id="GetBinInformation" version="1"/>
<Item name="PlantBinLocationId">
<Data>1254</Data>
</Item>
<Item name="PlantBinLevel" >
<Data>10 </Data>
</Item>
<Item name="PlantPriorBinLevel" >
<Data> 5</Data>
</Item>
</ListenerRequest>

The sample contains a <ListenerRequest> tag with these attributes and nested tags:

  • seq= an attribute that specifies a unique string that will be returned in the reply to this request. The string is used by the enterprise application to differentiate a reply from several replies on the reply queue.
  • <ListenerMap> a nested tag whose id XML attributeid= attribute specifies the name of the listener map definition that will be used to map this request.

For example:
<ListenerMap id="LEVT1" />

  • <Item> a nested tag whose name= attribute specifies the name of the item element. This name should match the PropertyName column of an entry in the FromEnterprise section of a Listener Map Definition window, in order for the data in the <Data> element to be sent to the listener trigger.
  • <Data> a nested tag whose value determines what is sent to the Listener Trigger.

ListenerReply

<?xml version="1.0 encoding="ISO-8859-1"?>
<ListenerReply seq="100">
<ListenerMap id="GetBinInformation" />
<Format encoded="no" delimiter="," />
<Item name="PlantBinLevel">
<Data>100</Data>
</Item>
<Item name="PlantBinLocation">
<Data>25</Data>
</Item>
</ListenerReply>}

The sample contains a <ListenerReply> tag with these attributes and nested tags:

  • seq= an attribute that specifies a unique string that was specified in the ListenerRequest. The value is returned in the reply and can be used by the enterprise application to differentiate a reply from several replies on the reply queue.
  • <ListenerMap> a nested tag whose id= attribute specifies the name of the Listener Map definition that was used to map the response.

For example: 

<ListenerMap id="GetBinInformation"/>
  • <Item> a nested tag whose name= attribute specifies the name of the item element. This name is specified in the PropertyName column of an entry in the To Enterprise section of a Listener Map Definition window's Output tab.
  • <Data> a nested tag that contains the value being returned from the listener trigger to the enterprise.