Create a REST wrapper on top of an existing SOAP web service

My team is developing a wrapper for a REST service on top of an existing SOAP-based web service. We donโ€™t know the internal SOAP services, we just have access to the WSDL file. Our REST service shell will only display one to one.

I know that he does not really adhere to the REST philosophy, although please let me call him REST services. This REST service will be deployed to Tomcat, and many clients will access it at the same time.

The current implementation is that for each client we will create a proxy object (using the SOAP WSDL proxy class). This proxy object will be used to invoke the SOAP APIs. SOAP requires binding authentication data to proxy objects, so we store these objects for each client in memory at runtime, making the first REST call to establish a session.

The stored object is retrieved at run time using the SessionID. Now the problem is that these proxy objects occupy large chunks of memory, and only a few REST clients are supported. (With a default of 64 MB, only 19 REST clients can be started). This is a problem now that we want to change our approach and ask for your suggestions.

Please let me know if there is any better solution. We do not want the database to save objects.

+1
source share
1 answer

If all you can do is call the HTTP / Soap service and not have access to the code, then you create your REST services using the appropriate REST conventions and then translate to SOAP service calls .. you create SOAP client classes automatically from WSDL and it will save you some time.

But you need to write your own translation level and not create a set of REST hacker services and try to insert it into the SOAP model. try to stay true to rest and make the translation layer more complex. It will be worth it.

0
source

All Articles