UAC.xml File Description

Overview

The UAC.xml file specifies listening attributes of UAC for inbound SOAP, JMS, and MQ operations.

As with the outbound operations, inbound listeners require connection and destination information as well as information regarding the name and location of the output file.

UAC.xml File - Main Elements


The following figure identifies the main elements of the UAC.xml file and describes the information specified by each element.

Element <UAC>
Root element (node) of the UAC.xml document of which there can be only one.

  • Element <JMSConnection>
    Properties for the connection to the JMS provider and for the listeners associated with the queues or topics for the specified inbound operation. Multiple <JMSConnection> elements are allowed within the <UAC> element.
    • Element <Name>
      Name of the JMS Connection. You could name your connection myOperation, ActiveMQ, WebSphere, or any other reasonably descriptive name.
    • Element <InitialContextProperties>
      Any properties of the JMS connection. They are listed in name-value pairs using the <property> element. Only one <InitialContextProperties> element is allowed in a <JMSConnection> element.
      • Element <Property>
        Any properties associated with the <JMSConnection> element that may be needed to initiate the connection such as the initial context factory and the service URL. It consists of a <Name> and <Value> element.
        Multiple <Property> elements are allowed within the <InitialContextProperties> element.
        • Element <Name> - Name of the property.
        • Element <Value> - Value of the property.
    • Element <ConnectionFactory>
      Connection factory name that is associated with the JMS Provider being accessed. Only one <ConnectionFactory> element is allowed per <JMSConnection> element.
    • Element <Listeners>
      Listeners that will be created for associated <JMSConnection> element. The <Listeners> element includes the information for the destination and action associated with the inbound operation.
      • Element <Destination>
        Destination in the JMS Provider, queue or topic, of the inbound operation.
      • Element <Actions>
        Action to take when a message is received. Currently only writing the message to a file is supported via the <JMSFileWriter> element.
      • Element <JMSFileWriter>
        Information necessary to write the body of the JMS message to a file and includes the following:
        • Element <Directory>
          Directory location of the file. This can be any available local or network based location.
        • Element <FileNamePattern>
          Name of the file and the sequence pattern if there will be more than one file written to the same directory.
        • Element <StartSequenceNumber>
          Starting number to use for the pattern sequence.
        • Element <WriteProperties>
          Specification for whether or not the JMS properties should be written to the file. Default is false.
  • Element <SOAPConnection>
    Properties for the SOAP connection that the target workload can connect to for the specified inbound operation. Multiple <SOAPConnection> elements are not allowed within the <UAC> element.
    • Element <URI>
      Unique Resource Identifier, the name of the object or resource requested by the user. This identifier contains a "path" to a method. This element must contain /axis2/services/UACInbound.
    • Element <Listeners>
      Listeners that will be created for associated <SOAPConnection> element. The <Listeners> element includes the information for the operation and action associated with the inbound operation.
      • Element <Operation>
        SOAP operation associated with the inbound operation.
      • Element <Actions>
        Action to take when a message is received. Currently only writing the message to a file is supported via the <SOAPFileWriter> element.
      • Element <SOAPFileWriter>
        Information necessary to write the body of the JMS message to a file and includes the following:
        • Element <Directory>
          Directory location of the file. This can be any available local or network based location.
        • Element <FileNamePattern>
          Name of the file and the sequence pattern if there will be more than one file written to the same directory. File name restrictions are enforced by the file system to which the file is being written. For example, using double quotation marks ( " ) around a file name in Windows will result in an error.
        • Element <StartSequenceNumber>
          Starting number to use for the pattern sequence.
        • Element <WriteEnvelope>
          Specification for whether or not the SOAP envelope should be written to the file. Default is false.

Element <MQConnection>
Properties for the connection to the MQ provider and for the MQ listeners associated with the queues for the specified inbound operation. Multiple <MQConnection> elements are allowed within the <UAC> element.
Element <Name>
Name of the connection which is user-defined. If you are going to define more than one MQ listener, the name for each MQ Connection must be unique
Element <Host>
Name or address of the server hosting the MQ Broker
Element <QueueManagerName>
Name of the MQ QueueManager.
It is the queue manager that provides the queuing services to the application program.
Element <Channel>
Name of the MQ Channel
Channels are named links between platforms across which messages are transmitted.
Element <Port>
Port where the MQ Series Broker is listening (default is 1414).
Element <Listeners>
Listeners that will be created for associated <MQConnection> element.
The <Listeners> element includes the information for the operation and action associated with the inbound operation.
Element <QueueName>
Name of the MQ Queue to listen to.
Queues are named message repositories upon which messages accumulate until they are retrieved by programs that service those queues.
Element <MQFileWriter>
Information necessary to write the body of the MQ message to a file And includes the following:

  • Element <Directory>
    Directory location of the file. This can be any available local or network based location.
  • Element <FileNamePattern>
    Name of the file and the sequence pattern if there will be more than one file written to the same directory.
  • Element <StartSequenceNumber>
    Starting number to use for the pattern sequence.
  • Element <WriteProperties>
    Specification for whether or not the MQ properties should be written to the file. Default is false.

UAC.xml File - Sample

The following figure illustrates a sample UAC.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<sb:UAC xmlns:sb="http://com.stonebranch/uac/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.stonebranch/uac/ UAC.xsd ">
    <sb:JMSConnection>
        <sb:Name>ActiveMQ</sb:Name>
        <sb:InitialContextProperties>
            <sb:Property>
                <sb:Name>java.naming.factory.initial</sb:Name>
                <sb:Value>org.apache.activemq.jndi.ActiveMQInitialContextFactory
                </sb:Value>
            </sb:Property>
            <sb:Property>
                <sb:Name>java.naming.provider.url</sb:Name>
                <sb:Value>tcp://172.16.30.101:61616</sb:Value>
            </sb:Property>
        </sb:InitialContextProperties>
        <sb:ConnectionFactory>ConnectionFactory</sb:ConnectionFactory>
        <sb:Listeners>
            <sb:JMSListener>
                <sb:Destination>dynamicQueues/MyQueue</sb:Destination>
                <sb:Actions>
                    <sb:JMSFileWriter>
                        <sb:Directory>outputDirectory</sb:Directory>
                        <sb:FilenamePattern>jmsMessageQueue%Seq%.txt
                        </sb:FilenamePattern>
                        <sb:StartSequenceNumber>1</sb:StartSequenceNumber>
                        <sb:WriteProperties>false</sb:WriteProperties>
                    </sb:JMSFileWriter>
                </sb:Actions>
            </sb:JMSListener>
            <sb:JMSListener>
                <sb:Destination>dynamicTopics/MyTopic</sb:Destination>
                <sb:Actions>
                    <sb:JMSFileWriter>
                        <sb:Directory>outputDirectory</sb:Directory>
                        <sb:FilenamePattern>jmsMessageTopic%Seq%.txt
                        </sb:FilenamePattern>
                        <sb:StartSequenceNumber>1</sb:StartSequenceNumber>
                        <sb:WriteProperties>false</sb:WriteProperties>
                    </sb:JMSFileWriter>
                </sb:Actions>
            </sb:JMSListener>
        </sb:Listeners>
    </sb:JMSConnection>
    <sb:SOAPConnection>
        <sb:URI>/axis2/services/UACInbound</sb:URI>
        <sb:Listeners>
            <sb:SOAPListener>
                <sb:Operation>myOperation</sb:Operation>
                <sb:Actions>
                    <sb:SOAPFileWriter>
                        <sb:Directory>outputDirectory</sb:Directory>
                        <sb:FilenamePattern>soapMessage%Seq%.xml</sb:FilenamePattern>
                        <sb:StartSequenceNumber>1</sb:StartSequenceNumber>
                        <sb:WriteEnvelope>false</sb:WriteEnvelope>
                    </sb:SOAPFileWriter>
                </sb:Actions>
            </sb:SOAPListener>
        </sb:Listeners>
    </sb:SOAPConnection>
    <sb:MQConnection>
        <sb:Name>MQ Series Listener</sb:Name>
        <sb:Host>Server Host or IP</sb:Host>
        <sb:QueueManagerName>MQ QueueManager</sb:QueueManagerName>
        <sb:Channel>MQ Channel</sb:Channel>
        <sb:Port>MQ Listening Port</sb:Port>
        <sb:Listeners>
            <sb:MQListener>
                <sb:QueueName>MQ Queue to Listen to</sb:QueueName>
                <sb:Actions>
                    <sb:MQFileWriter>
                        <sb:Directory>Directory location to write file to</sb:Directory>
                        <sb:FilenamePattern>Filename pattern to write with %Seq% variable</sb:FilenamePattern>
                        <sb:StartSequenceNumber>0</sb:StartSequenceNumber>
                        <sb:WriteProperties>false</sb:WriteProperties>
                    </sb:MQFileWriter>
                </sb:Actions>
            </sb:MQListener>
        </sb:Listeners>
    </sb:MQConnection>
</sb:UAC>