Skip to content
This repository has been archived by the owner. It is now read-only.

RPC calls from gadget fail #292

Closed
GoogleCodeExporter opened this issue Sep 10, 2015 · 26 comments
Closed

RPC calls from gadget fail #292

GoogleCodeExporter opened this issue Sep 10, 2015 · 26 comments

Comments

@GoogleCodeExporter
Copy link

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Found in Release:
java 1.6.0
gwt 1.7.0
gwt-gadget 1.03

Detailed description:
I try to get the GadgetRPC demo running in iGoogle and wave sandbox. I fail
in both.

I suspect that the rpcUrl might be wrong, but couldn't find a spec for that.

I installed the gadget on
http://weblily.net/gadgetRPC/com.google.gwt.gadgets.sample.gadgetrpc.GadgetRPC/c
om.google.gwt.gadgets.sample.gadgetrpc.client.GadgetRPC.gadget.xml

The Error message I get is: RPC Failed:
com.google.gwt.user.client.rpc.StatusCodeException: <HTML>
<HEAD>
<TITLE>HTTP method POST is not supported by this URL</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>HTTP method POST is not supported by this URL</H1>
<H2>Error 405</H2>
</BODY>
</HTML>


In the wave sandbox the rcpUrl looks like this: 
//www-wave-opensocial.googleusercontent.com/gadgets/proxy/refresh=3600&container
=wave&gadget=http%3A%2F%2Fweblily.net%2FgadgetRPC%2Fcom.google.gwt.gadgets.sampl
e.gadgetrpc.GadgetRPC%2Fcom.google.gwt.gadgets.sample.gadgetrpc.client.GadgetRPC
.gadget.xml/http://weblily.net/gadgetRPC/com.google.gwt.gadgets.sample.gadgetrpc
.GadgetRPC/GadgetRPC

In iGoogle it looks like this (I stripped of the "www." part, otherwise I
get a SOP vialoation):
http://ig.gmodules.com/gadgets/proxy/refresh=3600&container=ig&gadget=http%3A%2F
%2Fweblily.net%2FgadgetRPC%2Fcom.google.gwt.gadgets.sample.gadgetrpc.GadgetRPC%2
Fcom.google.gwt.gadgets.sample.gadgetrpc.client.GadgetRPC.gadget.xml/http://webl
ily.net/gadgetRPC/com.google.gwt.gadgets.sample.gadgetrpc.GadgetRPC/GadgetRPC

Appreciate your help,

jofeux

Original issue reported on code.google.com by jof...@gmail.com on 17 Jul 2009 at 9:32

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

This is a server side message. There is a proxy between the sample RPC server 
and 
the client, probably in the Wave sandbox or maybe the iGoogle sandbox.  It is
possible that one of those proxies doesn't proxy POST urls.

I've seen it before when a Java servlet  doesn't implement doPost().  Is there 
any
way for you to trace the webcontainer running on weblily.net to see if it is 
indeed
receiving the request and rejecting it?  

Original comment by galgwt.reviews@gmail.com on 17 Jul 2009 at 11:23

  • Changed title: RPC calls from gadget fail
@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

I monitored the incoming traffic on weblily.net, but nothing showed up. So I 
think
the message is from the iGoogle proxy.

Does anyone know how to obtain a proper rpcUrl?

Meanwhile I found on the page
http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=GadgetsS
ampleApplications
a link to GadgetRPC. However this one doesn't work neither on iGoole nor in the 
wave
sandbox.

Here comes the link to the Gadget Manifest:
http://gwt.google.com/samples/GadgetRPC-1.0.2/com.google.gwt.gadgets.sample.gadg
etrpc.client.GadgetRPC.gadget.xml

Original comment by jof...@gmail.com on 17 Jul 2009 at 12:26

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Original comment by galgwt.reviews@gmail.com on 17 Jul 2009 at 6:05

  • Changed state: Accepted
  • Added labels: API-Gadgets
@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Just for information:

On page
http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=GadgetsS
ampleApplications
I found the official(?)implementation of GadgetRPC.

I tried to run 
http://gwt.google.com/samples/GadgetRPC-1.0.2/com.google.gwt.gadgets.sample.gadg
etrpc.client.GadgetRPC.gadget.xml
in iGoogle and in the wave sandbox. Both attempts failed.

Original comment by jof...@gmail.com on 17 Jul 2009 at 8:50

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

[deleted comment]
@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

halv0112 seems to report a similar (the same?) problem on the iGoogle developer 
Forum:
http://groups.google.com/group/Google-Gadgets-API/browse_thread/thread/a8d8f27c2
2cbe3d3/6ee7a5ab3947ff81?lnk=gst&q=proxy#6ee7a5ab3947ff81

Original comment by jof...@gmail.com on 21 Jul 2009 at 11:40

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

I traced with a sniffer and I saw from the log that the 405 is answered by this 
server:

Server: GFE/2.0

I think this is a Google server. After some investigation, I think that realy 
POST is 
not supported, but we should use a modified RPC method that URL Encode our 
payload 
and do a get, as reported by documentation:

http://code.google.com/apis/gadgets/docs/remote-content.html#methods-post

I know that we are using legacy API, but if the iGoogle container inject us the 
new 
proxy, it expects the POST in GET format with POST Data Encoded.

Original comment by luca.mas...@gmail.com on 25 Aug 2009 at 4:44

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Is there any solution to this? I'm trying to make rpc calls using gwt-gadget 
1.03
 and the  following exception is being thrown : 
com.google.gwt.user.client.rpc.InvocationException: Unable to initiate
the asynchronous service invocation -- check the network connection connection

Original comment by olga.vin...@gmail.com on 3 Dec 2009 at 2:28

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Hi, take a look here, I did some investigation on that:

http://www.lucamasini.net/Home/gwt/google-app-engine/developing-google-gadget-wi
th-
eclipse-gwt-plugin

Ciao.

Original comment by luca.mas...@gmail.com on 3 Dec 2009 at 3:23

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

it's great article , but in the end it doesn't work.I followed it as it is, but 
in 
the end i always get callback.onError. Can you help me , please

Original comment by olga.vin...@gmail.com on 4 Dec 2009 at 11:08

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

I need more information about what doesn't work, can you help me ?

Original comment by luca.mas...@gmail.com on 4 Dec 2009 at 11:09

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

GadgetResponse.getText() always return "", so onResponseReceived always fails

Original comment by olga.vin...@gmail.com on 4 Dec 2009 at 11:13

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

It works! Thank you so much!

Original comment by olga.vin...@gmail.com on 4 Dec 2009 at 2:47

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Ah, how did you solved this ?

Original comment by luca.mas...@gmail.com on 4 Dec 2009 at 2:50

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

It was my mistake..I tried to build it on my own , but then I  took your code, 
and it
works. Thank you again, you saved our project!

Original comment by olga.vin...@gmail.com on 4 Dec 2009 at 6:16

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Using Live HTTP headers is see that actually a OPTIONS http method is used. 
Even the 
gadget hosted at http://gwt.google.com/samples/GadgetRPC-
1.0.2/com.google.gwt.gadgets.sample.gadgetrpc.client.GadgetRPC.gadget.xml does 
not work 
.

Original comment by hans.mel...@gmail.com on 8 Dec 2009 at 1:30

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

I am always getting an error when the request is taking too long to process. Is 
there a 
timeout for the response to arrive? how do make it wait forever?

Original comment by alaa....@gmail.com on 16 Dec 2009 at 11:35

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Original comment by zundel@google.com on 21 Dec 2009 at 1:32

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

I followed to Luca's article exactly, but I still get a HTTP405 Error (HTTP 
method
POST is not supported by this URL). What could be wrong?

Original comment by F.Kar...@cadenas.de on 4 Mar 2010 at 2:56

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

I checked and what I wrote is still valid.

Can you tell me what you did ?? Write that in the Google Group or to me 
directly.

Original comment by luca.mas...@gmail.com on 4 Mar 2010 at 8:19

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Luca's solution is very clever, but complex and it rightly belongs in the
infrastructure. It seems to me that this issue really needs to be a 
high-priority
issue - without the ability to make RPC calls, a gadget loses much of its 
interest.

Original comment by benjamin...@gmail.com on 27 Mar 2010 at 5:21

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

As an aside, I got the library to work on GWT 2.0, and the simplest of RPC test 
fails
with the issues described above: the initial call is an OPTIONS request, which 
gets a
405 from a iGoogle proxy.

Original comment by benjamin...@gmail.com on 27 Mar 2010 at 6:34

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

I totally second #21.

Original comment by sebno...@gmail.com on 17 Jun 2010 at 4:57

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

The Gadget RPC example has been updated with the trunk version of gwt-gadgets, 
which will go out in the next release.

http://gwt-code-reviews.appspot.com/655801/show

Original comment by zundel@google.com on 23 Jun 2010 at 3:36

  • Changed state: FixedNotReleased
@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

Fixed in gwt-gadgets-1.2.0 release.

Original comment by zundel@google.com on 30 Jun 2010 at 6:06

  • Changed state: Fixed
@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Sep 10, 2015

If using GWT 2.1.0M1, please look at this issue: 
http://groups.google.com/group/gwt-google-apis/browse_thread/thread/2f1599ed7563
b070

But the GadgetRPC application should be updated with the fix (overriding a 
method that is now doing some header check).

Daniel

Original comment by temp.dan...@gmail.com on 26 Aug 2010 at 8:52

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant