Parsing Output Document Schema

The following is the schema for the output document used for parsing step:

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.tibco.com/schemas/asgMapping/Schema.xsd2" xmlns:tns="http://www.tibco.com/schemas/asg/context" targetNamespace="http://www.tibco.com/schemas/asgMapping/Schema.xsd2" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:annotation>
        <xs:documentation>This schema describes the structure of the XML document that should be returned from the ActiveMatrix Service Gateway's "parse" step</xs:documentation>
    </xs:annotation>
    <xs:import namespace="http://www.tibco.com/schemas/asg/context" schemaLocation="context.xsd" />
    <xs:element name="output">
        <xs:complexType>
            <xs:choice>
                <xs:sequence minOccurs="0" maxOccurs="unbounded">
                    <xs:choice minOccurs="0">
                        <xs:element ref="requester" minOccurs="0" />
                        <xs:element ref="serviceInterfaceVersion" minOccurs="0" />
                        <xs:element ref="referenceId" minOccurs="0" />
                        <xs:element ref="serviceId" minOccurs="0" />
                        <xs:element ref="timestamp" minOccurs="0" />
                        <xs:element ref="correlationId" minOccurs="0" />
                        <xs:element ref="identityId" minOccurs="0" />
                        <xs:element ref="opCoId" minOccurs="0" />
                        <xs:element ref="partnerId" minOccurs="0" />
                        <xs:element ref="routingKey" minOccurs="0" />
                        <xs:element ref="stickyRoutingKey" minOccurs="0" />
                        <xs:element ref="monitor" minOccurs="0" maxOccurs="unbounded" />
                        <xs:element ref="key" minOccurs="0" maxOccurs="unbounded" />
                        <xs:element ref="tns:context" />
                    </xs:choice>
                </xs:sequence>
                <xs:sequence>
                    <xs:element ref="errorCode" />
                    <xs:element ref="errorMessage" />
                </xs:sequence>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <xs:element name="requester" type="xs:string">
        <xs:annotation>
            <xs:documentation>This value is stored in the RequestorId attribute of the API Exchange Gateway transaction object. This is currently not used. </xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="serviceInterfaceVersion" type="xs:string">
        <xs:annotation>
            <xs:documentation>This value is stored in the Service-InterfaceVersion attribute of the API Exchange Gateway transaction object. This is currently not used.</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="referenceId" type="xs:string">
        <xs:annotation>
            <xs:documentation>TThe value stored in this field will be stored by the Central Logger in the TRN_TRANSACTION_ID column of the main ASG_TRANSACTIONS table. It may be used to store an external transaction id or reference key that is extracted from the payload message of the received request.
            </xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="serviceId" type="xs:string">
        <xs:annotation>
            <xs:documentation>Currently not used</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="timestamp" type="xs:string">
        <xs:annotation>
            <xs:documentation>Currently not used</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="correlationId" type="xs:string">
        <xs:annotation>
            <xs:documentation>Currently not used</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="identityId" type="xs:string">
        <xs:annotation>
            <xs:documentation>Currently not used</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="opCoId" type="xs:string">
        <xs:annotation>
            <xs:documentation>This value is stored in the OpCo attribute of the API Exchange Gateway transaction object. This is currently not used.</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="partnerId" type="xs:string">
        <xs:annotation>
            <xs:documentation>This element is used to perform content based identity mapping for the requester. It must contain the partner name as configured in the Configuration UI. The original partner id will be stored as an adress element with type "incomingPartner" so that the data will be logged to the central logger.
            </xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="routingKey" type="xs:string">
        <xs:annotation>
            <xs:documentation>f this element is present it's value will be used to set the routing key for the request to determine which target operation or target group the request should be routed to.</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="stickyRoutingKey" type="xs:string">
        <xs:annotation>
            <xs:documentation>This element is used to set the sticky key for a request for which a load-balancing policy with StickyResourceAffinity.</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="monitor">
        <xs:annotation>
            <xs:documentation>Node element for defining content based throttle monitor configuration.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="metricName" />
                <xs:element ref="metricIncrement" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="metricName" type="xs:string">
        <xs:annotation>
            <xs:documentation>Throttle name for which a content based counter increment needs to be set.</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="metricIncrement" type="xs:int">
        <xs:annotation>
            <xs:documentation>Content based counter increment value that will be applied to the throttle as defined in the metricName element.</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="key">
        <xs:annotation>
            <xs:documentation>This element may be used to store business keys extracted from the received request. These can be accessed by custom extensions and are also logged to the transaction DB by the CentralLogger.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="type" type="xs:string">
                        <xs:annotation>
                            <xs:documentation>The key used to store the contextual information in the Central Logger database, Its value will be stored in the KEY_TYPE column of the ASG_TRANSACTION_KEYS table.</xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="log" type="xs:boolean">
                        <xs:annotation>
                            <xs:documentation>Switch to suppress logging of a key in the Central Logger database. The default value is True, including when you omit the attribute, as such its only impact is when you set it to False.This is useful when key is used to pass parameters to custom policies that don’t need to be logged.
                            </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="errorCode" type="xs:string">
        <xs:annotation>
            <xs:documentation>If the parse step returns an errorCode then the further processing of the request is terminated and the response is generated by the fault mapper. If this value is registered in ASG's "Error Maps" and a "FaultReport XSLT" is defined on the Operation then the mapping will succeed. Otherwise a default value of 1001 will be used.</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="errorMessage" type="xs:string">
        <xs:annotation>
            <xs:documentation>The detailed error description</xs:documentation>
        </xs:annotation>
    </xs:element>
</xs:schema>
Note: Overriding headers at parse step is not supported.