I was exploring Swagger and I must acknowledge I'm loving it.
I understand Swagger is primarily for RESTful web services, but I was wondering if we can make it work with SOAP web services as well.
May be translate SOAP based web services to RESTful? Or simply call SOAP based services via Swagger UI? Some hack? Has anyone done it?
Based on the present spec, I do not think so. It would not be easily possible to mention various aspects of a WSDL in swagger
To name a few:
- PortTypes
- Schemas and namespaces of request and response messages
- SOAP encodings (RPC/Literal etc.)
online "translate SOAP based web services to RESTful" is what exactly DreamFactory does. Open Source API management tool based on Swagger. Here you can read about SOAP-to-REST functionality.
This might be worth a try: Swagger connector and Preparing the API for consumption.
There is a module for pointing at a SOAP WSDL to expose it through a Loopback server: http://strongloop.com/strongblog/soap-into-rest-apis-with-loopback-node-js/
As an API server to glue existing and new data sources, LoopBack is
designed to facilitate your backend data integration. With the
release of loopback-connector-soap module, you can now easily consume
SOAP web services and transform them into REST APIs.
I can't yet confirm that it works, but it looks like a way of exposing a SOAP service using Swagger.