Help ME

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Help ME

Gianluca-5
Help me!

When i call a remote procedure (rails with render json)

i have only timeout

this is my code



var req = new
qx.io.remote.Request("http://127.0.0.1:3000/clienti/list","POST","text/plain");
req.setCrossDomain(true);


req.addListener("completed", function(e) {
   alert(e);
});
req.addListener("timeout", function(e) {
   alert("errore");
});
req.send();

and this is the result with firebug

var req = new qx.io.remote.Request("http://127.0...on(e) {
alert("errore"); }); req.send();
10811390 qx.io.remote.RequestQueue[52]: Timeout: transport 8tNative.js
(riga 61)
10811392 qx.io.remote.RequestQueue[52]: 5269ms > 5000msNative.js (riga 61)
10811395 qx.io.remote.Exchange[8t]: Timeout: implementation 8u


Can youi heklp me???


Thank you


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help ME

Derrell Lipman
On Mon, Nov 2, 2009 at 12:30, Gianluca Rettore <[hidden email]> wrote:
Help me!

When i call a remote procedure (rails with render json)

i have only timeout

this is my code



var req = new
qx.io.remote.Request("http://127.0.0.1:3000/clienti/list","POST","text/plain");
req.setCrossDomain(true);

I recently posted this message to the mailing list. It should provide some direction:

Cross-domain requests are tricky, in that they can be dangerous, and that they can't be done with traditional XMLHttpRequest calls. qooxdoo implements cross-domain requests in a way that works easily with qooxdoo's backends but will require a bit of change to non-qooxdoo backends.

I'm not familiar with web2py, but if it's not designed to work with qooxdoo cross-domain calls, you'll have to make some changes to it. In qooxdoo, when a cross-domain request is made, the "Script Transport" is used. This transport expects to receive back *a call to a function* in qooxdoo. qooxdoo sends a request which includes a request id. The response from the backend should be in the form:

  "qx.io.remote.transport.
Script._requestFinished(requestId, responseValue);"

where requestId is the id that was passed to the request initially, and responseValue is whatever your remote procedure call is trying to return.

Take a look at qooxdoo.contrib project RpcPhp or one of the other qooxdoo backends to see the little bit of extra handling required for cross-domain requests. (And then remember that bit about "dangerous" and be very, very careful.)

Hope that helps.

Derrell


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help ME

Andreas Ecker
In reply to this post by Gianluca-5
Hi,

forwarding this email to the mailing list, since Gianluca's original
post was caught by the spam protection and deleted accidentally.

Andreas

PS: Well, I wonder if there shouldn't be some punishment for subjects
such as "Help ME"? Please always use more meaningful subjects.


-------- Forwarded Message --------
From: Gianluca Rettore <[hidden email]>
To: [hidden email]
Subject: Re: Help ME
Date: Mon, 2 Nov 2009 22:30:22 +0100

Derrell Lipman ha scritto:
 > On Mon, Nov 2, 2009 at 12:30, Gianluca Rettore  
<[hidden email] <mailto:[hidden email]>> wrote:
 >
 >     Help me!
 >
 >     When i call a remote procedure (rails with render json)
 >
 >     i have only timeout
 >
 >     this is my code
 >
 >
 >
 >     var req = new
 >     qx.io.remote.Request("http://127.0.0.1:3000/clienti/ 
list","POST","text/plain");
 >     req.setCrossDomain(true);
 >
 >
 > I recently posted this message to the mailing list. It should  
provide some direction:
 >
 >     Cross-domain requests are tricky, in that they can be  
dangerous, and
 >     that they can't be done with traditional XMLHttpRequest calls.
 >     qooxdoo implements cross-domain requests in a way that works  
easily
 >     with qooxdoo's backends but will require a bit of change to
 >     non-qooxdoo backends.
 >
 >     I'm not familiar with web2py, but if it's not designed to work  
with
 >     qooxdoo cross-domain calls, you'll have to make some changes to  
it.
 >     In qooxdoo, when a cross-domain request is made, the "Script
 >     Transport" is used. This transport expects to receive back *a  
call
 >     to a function* in qooxdoo. qooxdoo sends a request which  
includes a
 >     request id. The response from the backend should be in the form:
 >
 >       "qx.io.remote.transport.
 >     Script._requestFinished(requestId, responseValue);"
 >
 >     where requestId is the id that was passed to the request  
initially,
 >     and responseValue is whatever your remote procedure call is  
trying
 >     to return.
 >
 >     Take a look at qooxdoo.contrib project RpcPhp or one of the other
 >     qooxdoo backends to see the little bit of extra handling required
 >     for cross-domain requests. (And then remember that bit about
 >     "dangerous" and be very, very careful.)
 >
 >     Hope that helps.
 >
 >     Derrell
 >


Thank you for your answer, now i study this problem, but now i have  
another question!

Qooxdoo can be a server??? how i can use qooxdoo with a server and how  
i can connect to db??? Have you docs to read for my night?

Thank you in advance!

Gianluca rettore




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help ME

Derrell Lipman
On Tue, Nov 3, 2009 at 05:16, Andreas Ecker <[hidden email]> wrote:

Thank you for your answer, now i study this problem, but now i have
another question!

Qooxdoo can be a server??? how i can use qooxdoo with a server and how
i can connect to db??? Have you docs to read for my night?

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help with rpc

Gianluca-5
Derrell Lipman ha scritto:

> On Tue, Nov 3, 2009 at 05:16, Andreas Ecker <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>     Thank you for your answer, now i study this problem, but now i have
>     another question!
>
>     Qooxdoo can be a server??? how i can use qooxdoo with a server and how
>     i can connect to db??? Have you docs to read for my night?
>
>
> This should get you started:
>
> http://qooxdoo.org/documentation/0.8/rpc
> http://qooxdoo.org/contrib/project#rpcexample
> http://qooxdoo.org/contrib/project#rpcphp
> http://qooxdoo.org/contrib/project#rpcjava
> http://qooxdoo.org/contrib/project#rpcperl
>
> Derrell
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Thank you i have another question if i have a webservice in ruby on
rails i use xml-rpc with qx.io.remote.Rpc() i have some probelm i have
set CrossDomain???

Thank you in advance

Gianluca Rettore


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help with rpc

Derrell Lipman
On Tue, Nov 3, 2009 at 21:56, Gianluca Rettore <[hidden email]> wrote:
Thank you i have another question if i have a webservice in ruby on
rails i use xml-rpc with qx.io.remote.Rpc() i have some probelm i have
set CrossDomain???

Take a look at the Server Writer's Guide mentioned in those docs I sent you. I see no reason (other than never having used it) that you couldn't write a qooxdoo-compatible JSON-RPC server in RoR.

Derrell
 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel