Membrane API Gateway links to this page with the title Not a SOAP message. when the wsSecurity plugin cannot apply WS-Security because the message is not a SOAP message. The detail says whether the request or the response body was affected.
The response contains the title Not a SOAP message., a detail naming the flow, the problem type https://membrane-api.io/problems/user and a link to this page. The type user means that the message, not the gateway, caused the problem. The status depends on the flow:
| Flow | Status | Responsible |
|---|---|---|
| Request | 400 Bad Request | Client |
| Response | 500 Internal Server Error | Backend |
In production mode, the title of the 500 response is replaced by Internal Server Error.
The wsSecurity plugin validates and secures SOAP messages: it checks signatures, timestamps and username tokens, decrypts, signs and encrypts. All of this operates on the SOAP envelope, so the plugin first checks that the body is one. Runtime failures during the actual processing are reported under internal/ws-security.
The detail reads The request body is not XML or does not contain a SOAP body, so WS-Security could not be applied. (or response body). The body is empty, is JSON or text, its root element is not a SOAP 1.1 or SOAP 1.2 Envelope, for example because of a wrong envelope namespace, or the envelope has no Body.
The detail reads The request body could not be parsed as XML, so WS-Security could not be applied. The body passed the first check for a SOAP envelope, but is malformed further down in the document.
In the response flow, the backend returned something other than a SOAP envelope, for example an HTML error page or an empty body.
Body.wsSecurity only in APIs or flows that carry SOAP messages, for example inside a request or response flow.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:
Tutorials with runnable examples:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.