This example shows how to expose a simple REST API that calls an existing SOAP service and transforms the result back into JSON.
It demonstrates how Membrane can be used for legacy integration scenarios where clients prefer JSON/REST but the backend only provides SOAP.
-
Open a terminal at the
examples/web-services-soap/rest2soap-templatedirectory. -
Execute
membrane.shormembrane.cmd -
Call the REST endpoint:
curl "http://localhost:2000/cities/Paris" -
You will receive a JSON response with the country and population extracted from the SOAP service:
{ "country": "France", "population": 11346800 } -
Take a look at
apis.yamlto see how it works.
- Exposing legacy SOAP services as REST/JSON APIs.
- Gradual migration from SOAP to REST without rewriting backend systems.
- Simplifying integration for clients that cannot handle SOAP.