Layer7 API Management

Expand all | Collapse all

XSLT: Message not XML; cannot perform XSL transformation

Jump to Best Answer
  • 1.  XSLT: Message not XML; cannot perform XSL transformation

    Posted 10-18-2017 05:49 AM

    I'm building a REST service in which I use a Set Context Variable "x" with Content-Type "text/xml; charset=utf-8" and valid XML content. Then I proceed to "Apply XSL Transformation" to this variable "x" with a valid XSLT Stylesheet. But I'm getting the error "Message not XML; cannot perform XSL transformation". Why?

     

    Am I doing something wrong or is it not possible to use XSLT if the service is not SOAP?

     

    Cheers,

     

    Fabio



  • 2.  Re: XSLT: Message not XML; cannot perform XSL transformation

    Posted 10-18-2017 06:39 AM

    Hello Fabio.

     

    Is it possible for you to post a screenshot of your policy and also the XML inside the variable X? Are you sure the XML is valid and there is not typos or space left, for example?

     

    --

    Alan Cota

    Sr. Principal Consultant

    +1 (972) 439-4545

    alan.cota@ca.com

     

    Get Outlook<https://aka.ms/qtex0l> for iOS



  • 3.  Re: XSLT: Message not XML; cannot perform XSL transformation
    Best Answer

    Posted 10-18-2017 11:47 AM

    Hi, Alan.

     

    I ended up rewriting my logic using the Response XPath assertion. It suited my use case better.

    Thanks for the quick reply!

     

    Cheers,

     

    Fabio