The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

shekhar.otari (7) [Avatar] Offline

We are going to create the SOA based architecture in our project. The client side will be in GWT. The server side comprises of Servlet, Web Services, EJBs, and so on. We want to communicate between the Servlet and browser using XML based messages. For that we probably use SOAP.

I would like to know how GWT provides the support for SOAP based communication between the browser and the servlet.
robert.hanson (173) [Avatar] Offline
Re: GWT communication using SOAP
No SOAP support ships with GWT. You should do a search on the Forum for "SOAP" to see if anyone has created a library to do that.

Personally I suggest either rolling your own minimal SOAP parser/writer or not using SOAP at all. SOAP is a pretty heavy protocol to want to run it is the browser.

Or maybe another way is to run a proxy on the server that uses simple messages to communicate with the client (GWT-RPC is pretty idea), and translates those calls to SOAP calls.
shekhar.otari (7) [Avatar] Offline
Re: GWT communication using SOAP
Thanks Robert for your quick suggestion.

Is there any alternative way other than SOAP for communication of GWT Client with the Servlet using XML based messages? We are not going to use GWT-RPC since it will tightly couple our application to Java based server.
robert.hanson (173) [Avatar] Offline
Re: GWT communication using SOAP
Beyond GWT-RPC the toolkit comes with an XML parser and JSON parser. A light-weight XML solution could be XML-RPC, and I believe there are at least one or two out in the wild (search the dev group). JSON is also a pretty good alternative, you can visit for a long list of JSON libraries for tons of languages. ...Or you could just roll your own parser for some custom format.

I don't think that any one is better over another. If it was my choice, I would probably go with JSON because some of the better server-side JSON libraries will automatically construct the JSON message from native language objects. You still need to write the client-side handling, but the server-side interface should be mostly automated.
ckendrick (2) [Avatar] Offline
Re: GWT communication using SOAP
Very old thread, but I just ran across it and can provide a new answer: SmartGWT implements a complete SOAP/WSDL engine within the browser and supports contacting WSDL web services directly with no intervening server (assuming the GWT app and the WSDL service is on the same host):