Membrane API Gateway returns 500 Internal Server Error with the detail Could not process SOAP request! when the sampleSoapService plugin, the built-in demo City service, fails with an unexpected exception. Errors in the SOAP request itself do not lead here, so the cause is a broken installation or a bug in Membrane.
The response contains the status 500 Internal Server Error, the title Internal server error., the detail Could not process SOAP request!, the problem type https://membrane-api.io/problems/internal and a link to this page. In development mode, the exception message is included as well. The type internal means that the gateway could not complete the processing of the exchange. In production mode, the title is replaced by Internal Server Error and the details are left out.
The sampleSoapService plugin is a small SOAP service for demos and tutorials, see the SOAP tutorial. It returns information about cities and serves its WSDL for ?wsdl requests. A wrong HTTP method, an unparsable body or an unknown city are answered with a SOAP fault. Only unexpected exceptions end up as this error.
Membrane could not load or rewrite the bundled WSDL /wsdl/city.wsdl while it answered a ?wsdl request, for example because the resource is missing from the classpath or the XML could not be processed.
Processing the request ran into a state the service does not handle. This is rare and usually indicates a bug in Membrane.
Any other exception that the sampleSoapService plugin does not turn into an error response itself is reported under the same URL by Membrane's generic error handler. The detail then reads Aborting! Exception caused in … flow. and names the plugin, the request URI and the flow. Unless the exception points to your configuration or to the message, this usually indicates a bug in Membrane.
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 ---. The title then reads Internal Server Error, and instead of the details the response only contains a log key. Search the gateway log for this key to find the exception.
If the plugin is nested inside a request, response or abort element and throws an unexpected exception, the exception message, the stack trace and the link to this page are currently sent even in production mode. Fix the failing plugin rather than relying on production mode to hide them.
Configuration reference:
Tutorials with runnable examples:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.