Setting up JMS Properties
Procedure
- Create an XSLT File. Refer to Example XSLT.
- Copy the XSLT file to the ASG_CONFIG_HOME/ASG_Project/xslt/internal directory.
- Start the Config UI.
-
Create a new mapping as follows:
- Upload the XSLT file for the facade operation as follows:
- Click the Save icon to save the changes.
Example XSLT
Refer to the following XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:map="http://www.tibco.com/asg/mapping"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"
xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:form="http://www.tibco.com/asg/functions/form"
xmlns:c="http://www.tibco.com/schemas/asg/context"
xmlns:h="http://www.tibco.com/asg/protocols/http"
xmlns:k="http://www.tibco.com/asg/protocols/jms"
xmlns:f="http://www.tibco.com/asg/content-types/form"
xmlns:codecs="http://www.tibco.com/asg/functions/codecs"
exclude-result-prefixes="xsl soap11 c h form codecs"
>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
<xsl:variable name="cnRequestHref">
<xsl:value-of select="/transformation/cnRequest/@href"/>
</xsl:variable>
<xsl:variable name="context">
<c:context>
<xsl:for-each select="/transformation/context">
<xsl:copy-of select="document(@href)/c:context/*"/>
</xsl:for-each>
</c:context>
</xsl:variable>
<xsl:variable name="recdRequest">
<xsl:copy-of select="$context/c:context/c:entry[@key='asg:jmsRequest']/k:request"/>
</xsl:variable>
<xsl:variable name="reqBody">
<xsl:choose xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:when test="count(document($cnRequestHref)/soap:Envelope/soap:Body)=1">
<xsl:copy-of select="document($cnRequestHref)"/>
</xsl:when>
<xsl:otherwise>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<xsl:copy-of select="document($cnRequestHref)"/>
</soapenv:Body>
</soapenv:Envelope>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:template match="/">
<map:mapping-result>
<map:failOnError>false</map:failOnError>
<map:context>
<c:context>
<c:entry key="asg:jmsRequest">
<k:override-header name="httpheadertest">identity</k:override-header>
</c:entry>
</c:context>
</map:context>
<map:payload-xml>
<xsl:copy-of select="$reqBody"/>
</map:payload-xml>
</map:mapping-result>
</xsl:template>
</xsl:stylesheet>
Copyright © Cloud Software Group, Inc. All rights reserved.
