SOAP service calling an existing Rest service ?

Not applicable

Please suggest an approach :

Scenario: There is a legacy SOAP service and a newly developed REST service which does the same work. The legacy SOAP service has some clients who are reluctant to use the NEW Rest service - they will send SOAP request only and only accept SOAP response !

Please advice if APIGEE can help for above scenario and below solution - feel free to refine -

1. Client sends SOAP request

2. SOAP service processes this request --> converts xml to json and calls NEWER REST service

3. NEW REST service process the json request and returns back json to SOAP Service

4. SOAP service converts json to xml SOAP response and sends it to client.

1 10 8,214
10 REPLIES 10

Yes of course. Apigee Edge can help you do this.

In many cases we have the scenario in which a customer has a legacy SOAP service, which works well, but the new app developers would prefer to use something more REST-ful. In that case the customer can use Apigee Edge to produce a REST facade on top of an existing SOAP service.

But I understand your situation is the converse. You have a REST service and you would like to wrap a "SOAP facade" on top of THAT.

And there's no problem doing that.

What I suggest:

  • Use the "new proxy" wizard
  • Select "SOAP Service"
  • Specify your WSDL
  • Tick the box for "pass through SOAP"
  • "next next next" to finish the wizard
  • Then open the resulting API Proxy in the proxy editor
  • modify the proxy editor to mediate the appropriate SOAP POST requests to the various RESTful requests.

Thanks I will surely give this a try and let u know.

Were you able to implement this use case? I have same requirement.

Dino @Dino, how can I create the above steps, even though I haven't any wsdl source to fill wsdl field

Is it possible to provide more context around how to do below modification?

  • modify the proxy editor to mediate the appropriate SOAP POST requests to the various RESTful requests.

Sure!

The various inbound SOAP requests are distinguished by the contents of the SOAP envelope. Basically you need to look at the first child element of the SOAP Body to determine what request it is. Then you want to map requests with specific inbound XML elements to a specific target URL path.

This screencast shows the EXACT CONVERSE of what you seem to want to do, but it may be helpful in showing you what is possible. It may help. Also this screencast shows how you can extract data from XML. While the latter screencast shows you how to extract from the Response, you want to extract from the Request - so place that ExtractVariables policy on the request flow.

what would be the best way to produce a REST facade on top of an existing SOAP service? can you please provide further information? i would be of great help

Did you look at the screencast I mentioned above?  (from ~4 years ago) Was that insufficient or not satisfactory?  What would you like to do that is NOT covered in that existing recorded walkthrough?  

Hi @MANJIT KUMAR, you can follow @Dino answer for your scenario.

But when you say both legacy SOAP service and a newly developed REST service does the same work. I want to understand why you want to call the REST service from inside SOAP service?

In Apigee you can create a pass through SOAP proxy and complete the scenario in two steps,

  1. Client sends SOAP request
  2. SOAP service processes this request & send SOAP response to client.

Kindly highlight if I missed anything.

The client is unwilling to move to newer REST service. At our side we do not want to keep maintaining the legacy SOAP service. So we are contemplating this approach