On Fri, Oct 23, 2009 at 23:17, Don Lee <sam...@gmail.com> wrote:
>
> I sent a message to the web2py mailing list today asking is there was
> anything needed to allow for cross domain calls in it json-rpc setup.
> The answer was no. The python shell tests confirmed in my mind that
> the web2py backend was working properly.
>
>
> http://groups.google.com/group/web2py/browse_thread/thread/1b224f2206b816b5#
>
>
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
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel