Reputation: 4932
Is it possible to access GWT servlets using some protocol other than GWT-RPC (such AS SOAP)?
If yes is it required to make any changes on them?
If no how can I make GWT-RPC request manually & parse & convert server response from GWT-RPC to any other format (i.e. is there any third-party library to do this)?
Upvotes: 0
Views: 1974
Reputation: 3639
Yes you can access GWT servlets using protocols other than GWT-RPC by using an HttpRequest.
https://developers.google.com/web-toolkit/doc/2.4/DevGuideServerCommunication#DevGuideHttpRequests
It's quite common to use JSON in this manner. A tutorial is here https://developers.google.com/web-toolkit/doc/2.4/tutorial/JSON
Still, what format do you need? You can pass back data as an object to the client. If you are not making the request from a GWT client, then no you probably don't want to use rpc.
As for SOAP, have a look at the good discussion here https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/M2KshXZkLUo
From a GWT client use RPC or a RequestBuilder (HttpRequest)
If you need to call from a non-gwt client, then just use a servlet and don't bother trying to convert a returned rpc call.
Upvotes: 1