GWT AND SOAP

1,516 views
Skip to first unread message

Nitheesh Chandran

unread,
Jul 25, 2012, 1:54:52 AM7/25/12
to google-we...@googlegroups.com
 HI,

 Can we use GWT and SOAP  ? i read from some documents that GWT does not have a built in support for SOAP and  another document says it can be used in server side of GWT. it is a little bit confusing. Can anyone give me a clarification on this. Also i read SMART GWT has built in support for SOAP webservices. But i am looking for GWT AND SOAP. Is that possible ?

Thanks
Nitheesh

Rob Whiteside

unread,
Jul 25, 2012, 4:29:28 PM7/25/12
to google-we...@googlegroups.com
You are right that GWT does NOT have built in support for making SOAP calls.  GWT (like all javascript that runs in the browser) is subject to Same-Origin-Policy rules.  So you couldn't call any remote soap service anyway.  You can to do GWT-RPC to get to your server, then write a soap client on the server that sorta "proxies" the calls to the soap webservice.

--Rob

Nitheesh Chandran

unread,
Jul 26, 2012, 7:03:37 AM7/26/12
to google-we...@googlegroups.com
Okay thanks for the information. Do you have experience of writing a soap client on the GWT server ? or else can i get any links regarding that ?Or do we have any alternatives that can be used instead of SOAP ?

Blake McBride

unread,
Jul 26, 2012, 9:31:00 AM7/26/12
to google-we...@googlegroups.com
Greetings,

I ran through the same issues.  Spent quite a bit of time banging my head against the wall. (Still am!!)  I sense a lot of GWT stuff is simple to those who already know HTML/JavaScript/CSS/JSP/etc..  They understand what is going on underneath, what the limitations are, and what common workarounds are.  For those of us non-experts in the above technologies, GWT is very difficult.  It seems to be filled with arbitrary limitations and arbitrary mechanisms.  It is sad in a way because I believe GWT was meant to hide all that stuff.  In spite of all these frustrations however, I have found GWT to be the best thing out there.  HTML is the worst environment I've ever seen for writing interactive applications by far!

Naturally, GWT includes a communications mechanism that works and is sufficient if you write the front-end and backend in GWT.  There is no need for trying to use another mechanism - you'd be adding a lot of unnecessary work.  On the other hand, if you already have an existing back-end and you are trying to link it up with a GWT front-end you need something else like SOAP.  I spent a huge amount of time trying all sorts of ways to get this working with little success for a long time until I finally settled on something that worked well.  What I did was use GWT to create the front-end and backend so that the two sides were communicating in native GWT.  I then had the GWT backend create a socket connection with the real backend and communicate with it.  I created all of the code to very easily form the socket connection and have the ability to bi-directionally communicate via named methods and arbitrary structured data.  This can all be done without adding new classes for each communication (to specify the arguments).  Another beauty of this is that the real server and the GWT server can be operating on different machines, different URL's, different ports, etc..  

I offered the code to the GWT community before but there was no interest.  I haven't spent the time to package up the code due to the lack of interest but if you want it I'd be happy to package it up and give it to you.  Let me know.

Thanks, and good luck.

Blake McBride



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Jm6kSQORFkgJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Rob

unread,
Jul 26, 2012, 7:00:31 PM7/26/12
to google-we...@googlegroups.com
Hi,

If you are new to web services and SOAP.

Then I would recommend Eben Hewitt's book "Java SOA Cookbook" and soapUI:

-> http://www.soapui.org/

Cheers
Rob

Kiahu.com

Nitheesh Chandran

unread,
Jul 27, 2012, 12:06:19 AM7/27/12
to google-we...@googlegroups.com
Thanks Black and Rob ..



 Blake ,

 I would be happy if i get the packages you created. Since i am new to SOAP ,it would be really helpful. Please send me to my mail id : nithe...@gmail.com

 Thanks

 Nitheesh

Vassilis Virvilis

unread,
Aug 4, 2012, 5:39:03 AM8/4/12
to google-we...@googlegroups.com, Blake McBride
Hi everybody,

Sorry for the late post. I was offline

On 07/26/12 16:31, Blake McBride wrote:
> Greetings,
>
> I ran through the same issues. Spent quite a bit of time banging my
> head against the wall. (Still am!!) I sense a lot of GWT stuff is
> simple to those who already know HTML/JavaScript/CSS/JSP/etc.. They
> understand what is going on underneath, what the limitations are, and
> what common workarounds are. For those of us non-experts in the above
> technologies, GWT is very difficult. It seems to be filled with
> arbitrary limitations and arbitrary mechanisms. It is sad in a way
> because I believe GWT was meant to hide all that stuff. In spite of
> all these frustrations however, I have found GWT to be the best thing
> out there. HTML is the worst environment I've ever seen for writing
> interactive applications by far!
>

Couldn't put it better my self.

> Naturally, GWT includes a communications mechanism that works and is
> sufficient if you write the front-end and backend in GWT. There is no
> need for trying to use another mechanism - you'd be adding a lot of
> unnecessary work. On the other hand, if you already have an existing
> back-end and you are trying to link it up with a GWT front-end you
> need something else like SOAP. I spent a huge amount of time trying
> all sorts of ways to get this working with little success for a long
> time until I finally settled on something that worked well. What I
> did was use GWT to create the front-end and backend so that the two
> sides were communicating in native GWT. I then had the GWT backend
> create a socket connection with the real backend and communicate with
> it. I created all of the code to very easily form the socket
> connection and have the ability to bi-directionally communicate via
> named methods and arbitrary structured data. This can all be done
> without adding new classes for each communication (to specify the
> arguments). Another beauty of this is that the real server and the
> GWT server can be operating on different machines, different URL's,
> different ports, etc..
>

I am on a similar position right now. We are evaluating ways to bridge
SOAP and GWT. If you are using Apache-CXF as your GWT backend you could
use their javascript support and to JSNI from GWT to their client
javascript library (http://cxf.apache.org/docs/javascript-clients.html).
Unfortunately in my case I can't use it because I have a strict
requirement for ws-security that cxf's generated javascript does not
support. So we are looking to build GWT RPC as middle end (as you
suggested) and maybe auto generate the java interface files.

> I offered the code to the GWT community before but there was no
> interest. I haven't spent the time to package up the code due to the
> lack of interest but if you want it I'd be happy to package it up and
> give it to you. Let me know.
>

I would be very interested to see how you solved this problem.

Thanks

Vassilis Virvilis

Gerardo

unread,
Sep 17, 2012, 10:58:04 AM9/17/12
to Google-We...@googlegroups.com
> On Thu, Jul 26, 2012 at 6:03 AM, Nitheesh Chandran <nitheesh-
xuPyEPAd5z7...@public.gmane.org> wrote:Okay thanks for the information.
Do you have experience of writing a soap client on the GWT server ? or else can
i get any links regarding that ?Or do we have any alternatives that can be used
instead of SOAP ?
> On Thursday, July 26, 2012 1:59:28 AM UTC+5:30, Rob Whiteside wrote:You are
right that GWT does NOT have built in support for making SOAP calls.  GWT (like
all javascript that runs in the browser) is subject to Same-Origin-Policy
rules.  So you couldn't call any remote soap service anyway.  You can to do GWT-
RPC to get to your server, then write a soap client on the server that
sorta "proxies" the calls to the soap webservice.
>
>
> --RobOn Tuesday, July 24, 2012 10:54:52 PM UTC-7, Nitheesh Chandran

James Gustard

unread,
Sep 17, 2012, 5:12:27 PM9/17/12
to google-we...@googlegroups.com, Blake McBride

The simplest way to call Soap with GWT is to make a normal RPC service call to the remote servlet. Once you are in the servlet you are in the server side java code. From here you can make your SOAP call using your favourite Java soap client generator. We use axis 2 via maven but eclipse can generate the soap client for you from the wsdl. Return the data from the soap call to the gwt client code via the rpc call and serliazable beans. I wouldn't try to call soap directly from the generated java script client code.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

Jonathan Franchesco Torres Bca

unread,
Jul 24, 2013, 2:32:11 PM7/24/13
to google-we...@googlegroups.com
Hi, I am interested in your work, I need to perform the same work as your
in www.kiongo.com, my email is chssc...@gmail.com
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages