Membrane API Gateway returns 500 Internal Server Error with the title Operation failed when the SOAP service behind a wsdl2openapi API answers with a SOAP fault. The request passed the gateway, and the service reported the failure.
The response contains the status 500 Internal Server Error, the title Operation failed, the detail The service could not complete the operation., the problem type https://membrane-api.io/problems/operation-error and a link to this page. The type operation-error means that the backend service could not carry out the operation.
When the SOAP fault carries a <detail> element, its content is returned in the details field. In development mode, the response also contains the internal faultCode and faultMessage of the fault.
The wsdl2openapi plugin publishes a SOAP service as a JSON API, see WSDL to OpenAPI. A SOAP fault does not say whether the service rejected the input, failed internally or timed out, so Membrane cannot choose a more specific status and returns 500. Errors during the conversion itself are described under WSDL to OpenAPI conversion failed.
The service found the converted request invalid for the operation, for example because of business rules or missing data, and answered with a SOAP 1.1 or 1.2 Fault.
The service ran into an internal error and reported it as a SOAP fault.
If the service answers a one-way operation with a fault body, the fault is reported here instead of an empty success response.
details field and correct the request.faultCode and faultMessage of the response.By default, Membrane runs in development mode and adds details to error responses. To remove most of them, enable production mode:
configuration:
production: trueconfiguration: production: true
Add the configuration document to your apis.yaml and separate it from the APIs with ---. The title is then replaced by Internal Server Error, and faultCode, faultMessage and the link to this page are left out. The content of the fault's <detail> element is still returned in the details field, so make sure the SOAP service does not put sensitive information there.
Configuration reference:
Tutorials with runnable examples:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.