wood burning stoves 2.0*
The moose likes Web Services and the fly likes RESTlet and SOAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "RESTlet and SOAP" Watch "RESTlet and SOAP" New topic
Author

RESTlet and SOAP

Gallen Thomas
Greenhorn

Joined: Aug 15, 2010
Posts: 13
Hello everyone,

I used RESTlet to create a RESTlet server for one project but another project uses SOAP. I don't know SOAP at all. Can my REST methods see the SOAP messages? If so, I was thinking of maybe writing a translator so that it can call one of my REST methods (i.e. GET). Is there any tutorials on it around the web? I have been searching all day long. I must be using the wrong keywords.

Thanks in advance.
Jerome Louvel
Greenhorn

Joined: Dec 08, 2012
Posts: 2
Hi Gallen,

A Restlet server can technically receive a SOAP message as the request entity of POST methods in your server resources.

Regarding the exposition of a more automated bridge, that could be technically possible but you are talking about two different paradigms here (REST vs RPC) so it should be done very carefully.

Best regards
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12809
    
    5
A REST style client can certainly see a SOAP response message as an XML document.

The real problem is that a REST client will need trickery to generate a SOAP request to the SOAP server.

Generating a SOAP message from scratch will require a SOAP toolkit, however, if you can find the complete text of a valid SOAP request to this server, you can substitute your own variable values and POST the resulting (hopefully still valid) XML SOAP request to the server and read the SOAP response.

I have actually done this and it is sooooooo much simpler than creating a SOAP client with typical toolkits.

Bill
Jerome Louvel
Greenhorn

Joined: Dec 08, 2012
Posts: 2
I agree that this is a good and pragmatic way to do SOAP calls.

In Restlet Framework you could use the FreeMarker or Velocity template representations to dynamically insert the variables, like to produce HTML content.
Gallen Thomas
Greenhorn

Joined: Aug 15, 2010
Posts: 13
Wow thank you Jerome and William for your quick and intellectual responses. Very helpful tips. I will come back tell you guys how it turned out. I just have to learn SOAP now. :-s
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RESTlet and SOAP