On Thu, Mar 29, 2012 at 19:37, slah <[email protected]> wrote:
> Hello,
> this works for me with an async call, but how to do the same for sync
> calls?
> I tried something like this:
>
> // Instantiate an RPC object
> var rpc = new qx.io.remote.Rpc(url, serviceName);
>
> // Assuming your arguments to the RPC are in an array called params,
> // prepend the first parameter to callSync (methodname)
> // to the front of the array.
> params.unshift(methodName);
>
> // Now call the callSync function using a Function object's apply method.
> var res = rpc.callSync.apply(rpc, params);
>
> but this gives me an error: There is no transport implementation available
> to handle this request: qx.io.remote.Request[2059-0]
>
> what's wrong please?
>
My guess is that the url you're providing is not at the "same origin" as
the url where your page was loaded from, i.e., it's a cross-domain request.
Even if you specify cross-domain, you'll fail in that case, because there
is no transport available that knows how to issue a synchronous,
cross-domain request. For a synchronous request, only the XMLHttp transport
can be used, and it will only work for a same-origin request.
Derrell
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel