RPC data is not synchronous, meaning an object moving from the client to the server (javascript to java) looks different than one moving from the server to the client (java to javascript).
This complicates attempting to perform a java to java type of scenario. That said, it is not impossible, but it is fragile. The RPC format is mostly undocumented primarily due to the fact that it is still being tweaked between releases. This means that anything you write now could very well not work in a newer version of GWT. This isn't an issue with GWT itself as the serializers are generated at compile time. if you want to see how it all works, you could add the -gen flag to the GWTCompiler and it'll store the generated serialization code, and you could perhaps use that to aid your development. -jason On Jul 29, 2009, at 9:23 AM, Steve wrote: > > Thanks for the quick reply. > > Unfortunately I'm in a situation where I can't/shouldn't mess with the > GWT application that I'm trying to call remotely. It is a 3rd party > app that is distributed in WAR form. I'd rather not have to crack it > open and add a SOAP interface into it. > > Do you know of any documentation that details how I can format a POST > request to a GWT RPC service? > > Thanks > > On Jul 29, 10:11 am, Trevis <[email protected]> wrote: >> I'm also pretty new to GWT and your scenario never occurred to me. >> Generally i think that it's probably not the greatest idea to try and >> call the GWT RPC's from a different front end and i've not come >> across >> anything that would give you a wsdl (or something like a wsdl) that >> you could use from non GWT java app. But, i cant think of any reason >> why you couldnt make it work. >> >> The RPC calls are just HTTP Post requests which receive a JSON >> response. Introducing JSON into a non web app seems like a red flag >> to me but if you really wanted to do it, you should be able to >> convert >> those into java objects. >> >> I *think* that a better solution might be to just rewrite a SOAP >> based >> webservice layer that uses the same code that the GWT services calls. >> That's not a great solution either since it introduces duplication >> but >> perhaps a better way to go would be to port the logic to a SOAP based >> webservice layer and then call the SOAP service from the GTW RPC >> server so that the logic only exists in one place. >> >> Just a thought, ymmv. >> >> On Jul 29, 9:38 am, Steve <[email protected]> wrote: >> >>> Hello All, >> >>> I'm new to GWT so please forgive me if there is some obvious >>> answer to >>> my problem. I googled around for this information and came up dry. >> >>> Here is my problem. There is an existing GWT Application that I >>> want >>> to leverage in a new application that I am building. This GWT app >>> uses RPC. I was hoping to find a way to call some of its RPCs >>> from a >>> seperate non-GWT Java application. >> >>> I am more familiar with using SOAP services, which provides a way to >>> generate a client from a service description (WSDL). Is there >>> anything similar for GWT's RPC? If there isn't, does anyone know if >>> it is possible to create the POSTs to the GWT servlet by hand? Are >>> there any utilities for this? >> >>> Thanks, >> >>> Steve > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
