Re: Can I invoke RPC Methods from Java
On Jul 29, 11:11 am, Trevis trevistho...@gmail.com 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. Merely theorizing here (as I'm pretty new also to GWT). Wouldn't that be considering cross-technology communication? If so, writing a bridge between those technologies wouldn't be advised somehow? What is is; an RPC call is actually only calling the service's interface *Impl class's method, so writing a java based XML service through conventional servlets would be possible (I'm theorizing here.) Since the XML service would load the GWT server side java classes, it could access the server side's implementation directly of the RPC service, the service would return it's response unknowingly of whom actually requested it, then the XML service would take that response and output it as an XML response? (the adapter pattern) Or am I missing the point? --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Can I invoke RPC Methods from Java
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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Can I invoke RPC Methods from Java
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 stever...@gmail.com 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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Can I invoke RPC Methods from Java
Just to correct something...i dont know if you can call these rpc services from another java application, but GWT does not use JSON on their RPC calls. it is possible to work with json, but the default value are serialized objects. On Wed, Jul 29, 2009 at 12:11 PM, Trevis trevistho...@gmail.com 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 stever...@gmail.com 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 -- Quer aprender a programar? acompanhe: Wants to learn GWT? Follow this blog - http://tcninja.blogspot.com --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Can I invoke RPC Methods from Java
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 trevistho...@gmail.com 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 stever...@gmail.com 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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Can I invoke RPC Methods from Java
I'm still pretty new to GWT but i'd probably start by watching the messages in firebug (the firefox plugin) to see exactly what's going back and forth. Trevis On Jul 29, 10:23 am, Steve stever...@gmail.com 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 trevistho...@gmail.com 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 stever...@gmail.com 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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Can I invoke RPC Methods from Java
I tried using firebug, unfortunately the POST request data has some unreadable characters, which doesn't really help me all that much. Anyone have any hints for deciphering the POST request? Thanks, Steve On Jul 29, 11:50 am, Trevis trevistho...@gmail.com wrote: I'm still pretty new to GWT but i'd probably start by watching the messages in firebug (the firefox plugin) to see exactly what's going back and forth. Trevis On Jul 29, 10:23 am, Steve stever...@gmail.com 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 trevistho...@gmail.com 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 stever...@gmail.com 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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Can I invoke RPC Methods from Java
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 trevistho...@gmail.com 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 stever...@gmail.com 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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---