File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "RESTlet and SOAP" Watch "RESTlet and SOAP" New topic

RESTlet and SOAP

Gallen Thomas

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

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

Joined: Mar 22, 2000
Posts: 12681
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.


Java Resources at
Jerome Louvel

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

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
subject: RESTlet and SOAP
Similar Threads
RESTful Web Services Book Promotion Quries?
REST API Design RuleBook... why is necesary?
Parameters appears null on server
Doubt with Web Service
RESTFul webservice with axis2