Membrane API Gateway returns an error with the detail Could not transform using XSLT! when the soap2Rest plugin cannot apply its XSLT stylesheet, either to turn the incoming SOAP request into a REST request, or to turn the REST response into a SOAP response.
The response contains the title User error., the detail Could not transform using XSLT!, the exception, the problem type https://membrane-api.io/problems/user and a link to this page. Only the status tells the two directions apart:
The status is 400 Bad Request. The request did not reach the backend.
The error happens in the response flow, so the client receives 500 Internal Server Error. In production mode, the title is replaced by Internal Server Error.
The soap2Rest plugin lets SOAP clients call a REST backend. It turns the exchange into an XML document and applies requestXSLT to create the REST request. The REST response is turned into an XML document, too, and responseXSLT creates the SOAP response from it.
api:
port: 2000
flow:
- soap2Rest:
requestXSLT: request.xslt
responseXSLT: response.xslt
target:
url: https://api.predic8.de
api:
port: 2000
flow:
- soap2Rest:
requestXSLT: request.xslt
responseXSLT: response.xslt
target:
url: https://api.predic8.de
In the request flow, the body of the SOAP request is not well-formed XML.
In the response flow, the backend response is declared as XML or JSON in its Content-Type but is not well-formed, so it cannot be turned into the XML document that the stylesheet reads.
The stylesheet in requestXSLT or responseXSLT cannot be found or does not compile. Stylesheets are loaded on first use, so this shows up when the first request arrives, not at startup.
The stylesheet fails at runtime, for example through an xsl:message terminate="yes" or an error in an XPath expression.
requestXSLT and responseXSLT locations, and test the stylesheets against sample messages.Content-Type it sends.By default, Membrane runs in development mode and adds details to error responses that help you find the problem. These details may reveal information about your setup. In production, turn them off:
configuration:
production: trueconfiguration: production: true
Add the configuration document to your apis.yaml and separate it from the APIs with ---.
Configuration reference:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.