Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle Application Integration Architecture Foundation Pack
11g Release 1 (11.1.1.4.0)

Part Number E17364-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

B XSL for Developing CAVS-Enabled Oracle AIA Services

This appendix provides XSL text that should be used in developing Composite Application Validation System (CAVS)-enabled Oracle Application Integration Architecture (AIA) services.

This appendix includes the following sections:

B.1 AddTargetSystemID.xsl

This section provides XSL text that should be used to develop CAVS-enabled provider Application Business Connector Services (ABCSs).

For more information about how to use this XSL, see Section 15.4, "Developing ABCS for CAVS Enablement."

Example B-1 AddTargetSystemID.xsl

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
 xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
 xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
 xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.
  headers.ESBHeaderFunctions"
 xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
 xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.
  functions.Xpath20"
 xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.
  XRefXPathFunctions"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:ora="http://schemas.oracle.com/xpath/extension"
 xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
 xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.
  functions.ExtFunc"
 xmlns:corecom="http://xmlns.oracle.com/EnterpriseObjects/Core/Common/V2"
 xmlns:aia=http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core. 
  xpath.AIAFunctions exclude-result-prefixes="xsl plnk coresalesorder ns0 ns3
  ns5 ns1 client corecustcom ns4 corecom bpws ehdr aia hwf xp20 xref ora ids
  orcl">
   <xsl:param name="ConfigServiceName">{[ABCServiceNamespace]}[ABCServiceName]
   </xsl:param>
   <xsl:param name="ConfigPropertyName">Default.SystemID</xsl:param>
 
   <xsl:template match="/*">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
   </xsl:template>
 
   <xsl:template match="corecom:EBMHeader">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
   </xsl:template>

   <xsl:template match="corecom:EBMHeader/corecom:Sender">
      <xsl:copy-of select="."/>
      <xsl:if test="not(following-sibling::corecom:Target)">
         <corecom:Target>
            <xsl:variable name="TargetID" select="aia:getServiceProperty
             ($ConfigServiceName,$ConfigPropertyName,true())"/>
            <corecom:ID>
               <xsl:value-of select="$TargetID"/>
            </corecom:ID>
            <corecom:ApplicationTypeCode>
               <xsl:value-of select="aia:getSystemType($TargetID)"/>
            </corecom:ApplicationTypeCode>
         </corecom:Target>
      </xsl:if>
   </xsl:template>

   <xsl:template match="corecom:EBMHeader/corecom:Target">
      <corecom:Target>
         <xsl:copy-of select="@*"/>
         <xsl:variable name="TargetID">
            <xsl:choose>
               <xsl:when test="corecom:ID/text()">
                  <xsl:value-of select="corecom:ID/text()"/>
               </xsl:when>
               <xsl:otherwise>
                  <xsl:value-of select="aia:getServiceProperty
                   ($ConfigServiceName,$ConfigPropertyName,true())"/>
               </xsl:otherwise>
            </xsl:choose>
         </xsl:variable>
      <corecom:ID>
         <xsl:copy-of select="corecom:ID/@*"/>
         <xsl:value-of select="$TargetID"/>
      </corecom:ID>
      <xsl:copy-of select="corecom:OverrideRoutingIndicator"/>
      <xsl:copy-of select="corecom:ServiceName"/>
      <corecom:ApplicationTypeCode>
         <xsl:copy-of select="corecom:ApplicationTypeCode/@*"/>
         <xsl:choose>
            <xsl:when test="corecom:ApplicationTypeCode/text()">
               <xsl:value-of select="corecom:ApplicationTypeCode/text()"/>
            </xsl:when>
            <xsl:otherwise>
               <xsl:value-of select="aia:getSystemType($TargetID)"/>
            </xsl:otherwise>
         </xsl:choose>
      </corecom:ApplicationTypeCode>
      <xsl:copy-of select="corecom:EndPointURI"/>
      <xsl:copy-of select="corecom:Custom"/>
   </corecom:Target>
   </xsl:template>

   <xsl:template match="@*|node()">
      <xsl:copy-of select="."/>
   </xsl:template>
 
</xsl:stylesheet>

B.2 SetCAVSEndpoint.xsl

This section provides XSL text that should be used to develop CAVS-enabled requester ABCSs.

For more information about how to use this XSL, see Section 15.4, "Developing ABCS for CAVS Enablement."

Example B-2 SetCAVSEndpoint.xsl

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"xmlns:xsl=http://www.w3.org/1999/XSL/Transform 
 xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.  
 headers.ESBHeaderFunctions" xmlns:jhdr="http://xmlns.oracle.com/esb" 
 xmlns:corecom=http://xmlns.oracle.com/EnterpriseObjects/Core/Common/V2  
 exclude-result-prefixes="xsl corecom ehdr jhdr">
   <xsl:template match="/">
      <xsl:copy-of select="/*"/>
      <xsl:variablename="Endpoint"select="/*/corecom:EBMHeader/corecom:Message
       ProcessingInstruction/corecom:DefinitionID"/>
         <xsl:if test="$Endpoint!=''">
            <xsl:variable name="SetEndpoint"select="ehdr:setOutboundHeader
             ('/jhdr:ESBHeader/jhdr:location',$Endpoint,'jhdr=http://xmlns.
             oracle.com/esb;')"/>
         </xsl:if>
   </xsl:template>
</xsl:stylesheet>