If the server is on a different location you can however use JSONP to perform the request.
I have wrote a quick tutorial on this in a J2EE container but the client side code will still be the same: http://eggsylife.blogspot.com/2008/10/gwt-and-cross-site-jsonp-in-j2ee.html This is taken from a very good article from Dan Morill at Google on how to access web service using JSONP and GWT: http://code.google.com/support/bin/answer.py?answer=65632&topic=11368 Dans article particularly addresses the client side code. Eggsy On Oct 22, 1:34 pm, Lothar Kimmeringer <[EMAIL PROTECTED]> wrote: > markww schrieb: > > > It's just building a JSON encoded string, sending it to the URL where > > the service is at, then sends back the JSON serialized response. > > You shouldn't use the term WebService for this because it's > commonly used for "the other thing". > > > I'm using it from a java applet right now. Which examples should I > > look at to get this to work? Is that samples/JSON project the one I > > want? > > It looks fine from my side to see how to create a HTTP-request > and parse the returned JSON-data in a way to get a "Java-Object". > But you should be aware that this example only works if you > whitelist the server to be contacted if it's a different one > where the GWT-page is coming from. > > So you might think of moving the actual request out to a > RemoteServiceServlet and then I'm not sure if the JSON- > classes (residing in the client-package of GWT) will work > on the server, because there might JSNI-magic going on > (haven't checked the source, so I might be wrong). > > Just try it out, the worst thing that can happen is that > you get an error-message (of course this isn't valid if > the name of the "webservice" is "deleteallforreal" ;-) > > Regards, Lothar --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---