webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  XSLT transformation on API Gateway

    Posted Wed May 10, 2023 09:49 AM

    Hi guys,

    I am using Software AG API GW v10.11 and want to achieve following:

    Using XSLT request transformation I want to forward parameter from Headers section (in this case “ID”) to my native service. How can I achieve this?

    I successfully mapped parameters from request itself but struggling with forwarding parameter from Headers tab.

    Please, help!

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!-- Identity transform template -->
    <xsl:template match="@*|node()">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:template>
    
    <!-- Remove all request parameters except date -->
    <xsl:template match="request">
    <xsl:copy>
    <xsl:apply-templates select="date"/>
    </xsl:copy>
    </xsl:template>
    
    <!-- Add date parameter to request -->
    <xsl:template match="request/date">
    <xsl:copy>
    <xsl:value-of select="//request/date"/>
    </xsl:copy>
    </xsl:template>
    
    <!-- Add requestHeader with ID -->
    <xsl:template match="requestHeader">
    <xsl:copy>
    
    <ID>
    <xsl:value-of select="???????????????????????????????????????????"/> - here I need value from Headers parameter ID???
    </ID>
    </xsl:copy>
    </xsl:template>
    
    </xsl:stylesheet>
    

    #API-Management
    #webMethods
    #API-Gateway


  • 2.  RE: XSLT transformation on API Gateway

    Posted Mon June 26, 2023 03:30 AM

    Hi @ilicmarko ,
    Have you explored the option in the request transformation where we can extract the data from incoming request and forward it to the native request.
    It is available in the request transformation policy.

    Regards
    Vikash Sharma


    #webMethods
    #API-Gateway
    #API-Management