Expose SOAP 1.2 web service from java which calls another REST service

768 views Asked by At

I'm a Python programmer, we have a python back-end for a web project where we use Python web server (Tornado) to offer REST web services.

Few months ago, we were asked to offer SOAP for a client, and to our surprise Python 3 has very poor SOAP exposing capabilities. We tried Ladon & TornadoWS packages but both has it's limitations. Even some of them generate invalid response which does not comply with corresponding WSDL.

So Now I think a better way is to make the SOAP interface with Java which will consume our Python back-end's web service. I've some experience in Java but that was mainly using Struts framework. I need to find a lightweight, but heavily customizable solution.

Possible solution to offer JAVA soap interface which calls REST Python back-end

What I'm currently looking for is:

  • Imitate the WSDL exactly as it appears on our client's existing WSDL (Client will use our service but they want to make minimum changes).
  • 100% valid soap/xml response and WSDL! (Surprisingly, some 3rd party Python packages we tried generate invalid response). The SOAP service will be consumed by .NET platforms.
  • We need to have maxmimum control over generated WSDL's element names and namespaces, so that client can transparently switch to our web services.
  • A lightweight solution for exposing SOAP 1.1 & 1.2 services in Java which will be scalable to many concurrent requests.
  • This Java interface will call our Python back-end's REST web service. So I'm looking for something which is specifically suitable for this purpose.
  • Right now we use nginx + tornado for our REST web services, I'm looking for something similar in Java. Specially, something which address c10k problem. Basically what the Java interface do will just accept SOAP requests, and make HTTP calls and return those response. So I think this is reasonable to expect something similar like Tornado which offers non-blocking network I/O and scales well.

I'm aware that this question may be considered not constructive, but I'm really looking for some good opinion here as I did not find information in the web (maybe due to my poor searching).

I'm also open to other possible solutions to address our problem.

1

There are 1 answers

0
tfranckiewicz On

To consume your Python REST service, check out this answer:

Calling a web service with no wsdl

To create SOAP service, you should use Apache CXF and Spring Framework (Spring MVC). Checkout this example for details: http://cxf.apache.org/docs/writing-a-service-with-spring.html