On Tue, Jul 31, 2012 at 1:37 PM, ericallenpaul <[email protected]>wrote:
> I'm considering qooxdoo for a project but in my test I am unable to make
> the
> RPC function and I can't figure out why it won't work.
>
> I have a page which returns a JSON-RPC response from a post:
>
> http://74.143.64.2:5040/Handler1.ashx
>
> I try code like:
> alert("begin rpc");
>
> var rpc = new qx.io.remote.Rpc(
> "http://74.143.64.2:5040/Handler1.ashx",
> "TestJayrockRpc.Handler1"
> );
>
> rpc.setCrossDomain(true);
>
> //alert(qx.io.remote.Exchange.getImplementation());
>
> try
> {
> alert("calling");
> var result = rpc.callSync("WriteFile", '{"Data":"Test Me"}');
> alert("called");
> alert("Result of sync call: " + result);
> }
> catch (exc)
> {
> alert("Exception during sync call: " + exc);
> }
>
> alert("end rpc");
>
>
> All I get is an error:
>
> 13673158 qx.io.remote.Exchange[3615-0]: There is no transport
> implementation
> available to handle this request: qx.io.remote.Request[3614-0]
>
The problem is that you are specifying that the request is cross-domain,
meaning that it will use the Script transport, but then you also specify
that you want a synchronous request, and the Script transport is not
capable of issuing a synchronous request.
Do you require a cross-domain request? If not, i.e., if the request for the
RPC is to the same server and port from which the page was loaded, you
should not specify setCrossDomain(true), which will then allow the
XMLHttpRequest transport be used, which does support synchronous requests.
Note that synchronous requests, in some browsers, lock up the entire
browser (all tabs, not just the one running this particular program) during
the whole time that the browser is awaiting the response from the server.
For this reason, synchronous requests a generally frowned upon.
If you do need cross-domain, and switch to async requests, be sure that
your server responds with the correct format of data, as specified in the
docs.
This tells me that maybe there is something wrong with format being returned
> by the service. Or maybe the data being sent--but I have no clue what is
> wrong. I can't find very much information anywhere on how to get qooxdo to
> talk to a .net service.
What is a .net service? What does it receive/send?
Derrell
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel