JB,
Surprisingly, you say you want to "start with something super simple"
but in my experience, RPC implementations are not the simplest thing you
can do in Qooxdoo. So, I think you're trying to learn how to use
Qooxdoo by jumping into the middle of the learning curve. I'm betting
that you're going to get frustrated very quickly.
In this case, Index.php is replying that "you didn't send me a valid RPC
request" in your remote call - it doesn't just respond to normal http
requests, as it expects a specific request message format. I also don't
know what you mean by "OPTIONS" instead of POST or GET.
As Derrell said, you really should download the RPCExample contribution
and verify that it works with your RPC-PHP server - it's bound to be
much easier than trying to add RPC methods to the Hello World app, as
both the client and remote methods are already created for you.
Once it's working, you can look at how it's written to learn more about
configuring RPC calls, as you're going to need to write your own server-
side methods to match what you're doing in your client-side AJAX
methods. RPCExample is one of the best ways to see how to write Ajax
code for RPC-PHP - learn by example rather than building from scratch.
Step back and try that approach and please let us know if you have
trouble getting RPCExample to work after giving it a try.
HTH,
Gene
On Sun, 2009-10-18 at 09:21 -0600, JB wrote:
> I finally figured out what was going on with my app. I'm using the PHP
> rpc implementation in qooxdoo-contrib. The request goes the server,
> gets picked up by index.php but because the method used is "OPTIONS" and
> not POST or GET, index.php is replying with the following:
>
> JSON-RPC request expected; service, method or params missing<br>
>
> But in my App I see:
> Async(13) exception: Transport error 0: Unknown status code
>
> The 13 in the parens up there keeps incrementing each time I hit the
> buttons. What the heck is up with that? App code follows:
>
> var button1 = new qx.ui.form.Button("Send Rpc Request",
> "simwebui/test.png");
> var rpc = new qx.io.remote.Rpc();
> var mycall = null;
> //var container = new qx.ui.container.Composite(new
> qx.ui.layout.Basic());
>
> // Document is the application root
> var doc = this.getRoot();
>
> // Add an event listener
> button1.addListener("execute", function(e) {
> button1.setEnabled(false);
> var rpc = new qx.io.remote.Rpc();
> rpc.setTimeout(10000);
> rpc.setUrl("http://192.168.10.180/services/");
> rpc.setServiceName("qooxdoo.test");
>
> // call a remote procedure -- takes no arguments, returns a string
> var that = this;
> this.RpcRunning = rpc.callAsync(
> function(result, ex, id)
> {
> that.RpcRunning = null;
> if (ex == null) {
> alert(result);
> } else {
> alert("Async(" + id + ") exception: " + ex);
> }
> button1.setEnabled(true);
> },
> "echo.blabla");
>
>
> ------------------------------------------------------------------------------
> 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
------------------------------------------------------------------------------
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