On Wed, May 18, 2011 at 08:28, Carel Blumenstock <
[email protected]> wrote:

> First steps with qooxdoo,
>

Welcome!


> trying to get a simple web service call to a jayrock json-rpc web service
> working
>

A couple of things...

1. There is no way to do a synchronous, cross-domain request, so you should
use callAsync callAsyncListeners instead.

2. Cross-domain requests are implemented with <script> requests, and use a
system similar to JSONP. Since what you're actually loading is a script, the
result must be executable JavaScript, and in this case, must call a specific
function that provides the results back to qx.io.remote.*. See
http://demo.qooxdoo.org/current/apiviewer/#qx.io.remote for explicit
instructions for what your server must return.

That should get you going.

Cheers,

Derrell



>
>
> jayrock-0.9.12915 hello world demo web service, running under IIS 6
>
>
>
> namespace JayrockWeb
>
> {
>
>     using System;
>
>     using System.Web;
>
>     using Jayrock.Json;
>
>     using Jayrock.JsonRpc;
>
>     using Jayrock.JsonRpc.Web;
>
>
>
>     public class HelloWorld : JsonRpcHandler
>
>     {
>
>         [JsonRpcMethod("greetings")]
>
>         public string Greetings()
>
>         {
>
>             return "Welcome to Jayrock!";
>
>         }
>
>     }
>
> }
>
>
>
> Qooxdoo hello application build and running under IIS 6 with this
> modification to call the web service from above
>
>
>
>       // Add an event listener
>
>       button1.addListener("execute", function(e) {
>
>         alert("Hello World!");
>
>
>
>                                                 var rpc = new
> qx.io.remote.Rpc(
>
>                                                                 "
> http://localhost/JayrockTestService/HelloWorld.ashx";,
>
>
> "JayrockWeb.HelloWorld"
>
>                                                 );
>
>                                                 rpc.setCrossDomain(true);
>
>
>
>                                                 // synchronous call
>
>                                                 try {
>
>                                                                 var result
> = rpc.callSync("greetings", "Test");
>
>
> alert("Result of sync call: " + result);
>
>                                                 } catch (exc) {
>
>
> alert("Exception during sync call: " + exc);
>
>                                                 }
>
>       });
>
>
>
> Generated the build but result returns null. What should I fill in above to
> make result contain "Welcome to Jayrock!" upon return?
>
>
>
> T.I.A.
>
>
> ------------------------------
>
> [image: Every Angle]
>
> *Carel Blumenstock* | Software Developer
> Kampenringweg 45C | 2803 PE | Gouda | The Netherlands
> [email protected] | www.everyangle.com
> *T*:+31(0)182 577 744 <+31(0)182%20577%20744>
> *F*:+31(0)182 577 740 | *KvK*:24327140
>
> Follow us on
>
> [image: LinkedIn] <http://www.linkedin.com/groups?gid=129959>[image:
> Twitter] <http://twitter.com/_everyangle_>[image: 
> YouTube]<http://www.youtube.com/everyanglesoftware>
>
>
>
>
> ------------------------------------------------------------------------------
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its
> next-generation tools to help Windows* and Linux* C/C++ and Fortran
> developers boost performance applications - including clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

<<image003.png>>

<<image004.png>>

<<image002.png>>

<<image001.gif>>

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to