Calling SOAP service inside REST service

Shivam picture Shivam · Oct 31, 2015 · Viewed 16.8k times · Source

I want to code for a REST service using Restlet framework that wraps a third party SOAP service with some XML data. So whenever I call the REST service with some XML data that REST service internally calls that third party SOAP service with the XML data that I provided and the response travels from that third party SOAP API to REST API and from REST API to me. I have gone through this questions;

Calling a SOAP service using REST service

Calling SOAP in Jersey

But it didn't help me a lot, So it would be great if anyone provide me the links or tutorial where I can get any help. Thanks.

Answer

Thierry Templier picture Thierry Templier · Nov 2, 2015

I think that the following links could help you if you want to implement by hand:

The key challenge here is to convert request elements into the SOAP request since SOAP only uses HTTP as a transport protocol (both headers and payload) and the same for response (extract headers and payload to build the REST response). With Restlet, you need to leverage its REST API for this. See this link: http://restlet.com/technical-resources/restlet-framework/guide/2.3/core/http-headers-mapping.

I also saw these tools that seem to provide a proxy to adapt a SOAP service as REST service:

Hope it helps you, Thierry