Membrane API Gateway returns 400 Bad Request with the detail Could not generate XML from HTTP information! when the http2xml plugin cannot turn the incoming request into its XML representation. The request flow is aborted.
The response contains the status 400 Bad Request, the detail Could not generate XML from HTTP information!, the problem type https://membrane-api.io/problems/user and a link to this page. The type user means that the request the client sent triggered the problem. In development mode, the response also contains the underlying error.
The http2xml plugin converts the request, with its method, URI, headers and body, into an XML document that describes the HTTP message. Following plugins, such as XSLT transformations, can then process the whole request as XML. The plugin is experimental.
The request URI is not a valid URI, for example because it contains unencoded spaces or other illegal characters. Characters like spaces, | or ^ must be percent-encoded.
The request is declared as XML by its Content-Type, but the body is not well-formed XML or ends before the document is complete.
The request is declared as JSON, but the body is not valid JSON.
The request body cannot be read or decoded, for example because of a broken Content-Encoding.
Content-Type.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.