SOAP request to REST API

Hi,

Currently, we have a Client that can only make SOAP requests to the wider world.

We have new need to be able to call a REST API from the client and I was wondering if Apigee has any capacity to help facilitate this?

I have seen similar posts that suggest this would be possible, however they usually appear to be the other way around (A REST service calling a legacy SOAP client)

Any help would be much appreciated.

Thanks

0 6 905
6 REPLIES 6

You can certainly use Apigee for this use case, though there is no wizard to auto generate an API proxy that does SOAP to REST conversion (like there is for the much more common REST to SOAP scenario)

Design a WSDL, that'll be the interface of your proxy.

You'll then need to implement an API proxy that accepts a SOAP request (verb = 'POST', paths as specified in your soap operations). You can optionally use SOAPMessageValidation policy to validate against the WSDL, then use XML2JSon to convert request payload. After connecting to the REST backend, use a JSON2XML policy to convert back to XML. It's usual to either manipulate JSON with Javascript, or XML with an XSLTransform policy to make the conversions simpler.

Unfortunately the REST API we wan to connect to is a Third Party so all conversions would have to be done on Apigee, is this still possible?

Also would I set the endpoint in the wsdl as the REST endpoint?

Thanks again, much appreciated.

Yes you can certainly do all required conversions in Apigee, and that was what I was (implicitly) meaning.

In the WSDL use you Apigee proxy endpoint as the endpoint. In your proxy, set the REST endpoint as the target endpoint

Fantastic!

How would I obtain my endpoint before I upload my WSDL?

You can always create and deploy your Apigee proxy (even an empty skeleton). The overview will show you what the endpoint is.

I don't suppose there is a tutorial or something showing how this is done? I'm very new to the Apigee community