GWT WITH SOAP.

228 views
Skip to first unread message

prat

unread,
Dec 8, 2008, 4:17:46 AM12/8/08
to Google Web Toolkit
Hello,

Can anyone tell how to use webservices(SOAP request & SOAP response)
with GWT client??

Thanks
Prat

skanberg

unread,
Dec 8, 2008, 4:59:44 AM12/8/08
to Google Web Toolkit
The easiest way is probably to let your server layer handle the SOAP
request use RPC for communication between your GWT client and the
server.

For example, you make a GWT RPC request from your client, the GWT RPC
server part are invoked and makes the SOAP request and you takes the
SOAP response and sends it back in the RCP response.

/Fredrik

Lothar Kimmeringer

unread,
Dec 8, 2008, 5:33:26 AM12/8/08
to Google-We...@googlegroups.com
prat schrieb:

> Can anyone tell how to use webservices(SOAP request & SOAP response)
> with GWT client??

Personally I would go with Fredik's suggestion (he was just faster than
me answering here ;-)

If you really want to let it happen on the client-side, you might
have a look at previous mails on this list. Somebody was linking
to a library he implemented for doing this. The search-engine
of your least mistrust will help you find it ;-)


Regards, Lothar

mikeds...@gmail.com

unread,
Dec 8, 2008, 7:59:38 AM12/8/08
to Google Web Toolkit
2nd on Fredrik's solution...that's how we're doing it. GWT-RPC
between client and the "front" edge of the server. The "back" edge of
the server talks SOAP to the rest of our solution. I've tried SOAP
down to the web client directly...it can be done...but it wasn't as
easy as I thought it'd be. Was trying to do it in pre-GWT days, and
as Lothar says, it's been mentioned a number of times here that a
couple of libraries are out there....just do a little search.

Later,

Shaffer

prat

unread,
Dec 8, 2008, 12:44:18 PM12/8/08
to Google Web Toolkit
Thanks alot :)

prat

unread,
Dec 8, 2008, 12:44:37 PM12/8/08
to Google Web Toolkit
Thanks alot :)

prat

unread,
Dec 8, 2008, 12:44:49 PM12/8/08
to Google Web Toolkit
Thanks alot :)

On Dec 8, 4:59 am, "mikedshaf...@gmail.com" <mikedshaf...@gmail.com>
wrote:

prat

unread,
Dec 8, 2008, 12:49:37 PM12/8/08
to Google Web Toolkit
But if am using GWT-RPC then wats the need to use SOAP.. both are used
to to communicate with server..
using both SOAP & RPC at server side will redundant i think.
I wanna use SOAP instaed of RPC. will search more as u said.
Thanks alot all of u .. :)

On Dec 8, 4:59 am, "mikedshaf...@gmail.com" <mikedshaf...@gmail.com>
wrote:

ali.sc...@gmail.com

unread,
Dec 8, 2008, 12:54:49 PM12/8/08
to Google Web Toolkit
It certainly is possible, as web services are servlets in a way and
communicate over HTTP. However, you would need to know how to create a
correct SOAP message. Another problem is that the web service would
need to be in the same server as the GWT app, since XMLHTTPRequest
will not allow you to make calls to another server. If you are trying
to communicate with other web services, then a RPC service will be
your best shot, since the server does not follow the same rules and
act like a proxy in essence.

Otherwise, take a look at your web service's WSDL and construct a SOAP
formatted XML string and send it via POST to the web service. Here is
an example how to create one in Java: http://users.skynet.be/pascalbotte/rcx-ws-doc/xmlpost.htm

Jason Essington

unread,
Dec 8, 2008, 4:11:51 PM12/8/08
to Google-We...@googlegroups.com
The assumption was that you wanted to communicate to a different
server (than your GWT module came from) via SOAP, which is
particularly difficult to do with a web browser due to Same Origin
Policy. which would require GWT -> rpc to your server -> SOAP to
remote server

However if you are just communicating with your server, then don't
even bother with trying to use SOAP. It is overly verbose for use with
a javascript client, and you'd see much better performance with GWT-
RPC or JSON.

If you are trying to connect to existing services. you could still use
GWT-RPC, and have the rpc servlets just bypass the SOAP listeners and
connect directly to the underlying implementations.

-jason
Reply all
Reply to author
Forward
0 new messages