Layer7 API Management

Expand all | Collapse all

How to Preserve incoming request in request.mainpart after xslt transformation assertion.

  • 1.  How to Preserve incoming request in request.mainpart after xslt transformation assertion.

    Posted Mar 06, 2019 05:11 PM

    Hi,

     

    We need to preserve incoming request to use across multiple Apply xslt Transformation assertions.

     

    As of now when we Apply xslt Transformation assertion on Request it will overwrite request.mainpart with the output of xslt.  The problem we are facing is after the transformation if we try to use xsl:message function in xslt the request.mainpart  is null.

     

     

     

    any advice on how to preserve the original request besides using context variables?

     

    I don’t see an option to create multiple variables with a single apply xslt transform assertion.

    My use case:

     

    I need to capture some parameters in a request and store them in a variable in order to use them in response.

    Also I need to do namespace transformation on request.



  • 2.  Re: How to Preserve incoming request in request.mainpart after xslt transformation assertion.

    Broadcom Employee
    Posted Mar 06, 2019 05:20 PM

    You can copy the request to another context variable message, and then apply xslt on that context variable, then the request will not be changed.