hi all,

this release of the soap client comes with a new asyncronous call 
interface, called easy()


having defined the service url like so:

    // declare the url under which the services are defined
    var cli = new 
soapdemo.soap.Client("http://"+document.location.host+"/svc/";);

this is the old way of calling services (which is still supported):

    var params = new soap.Parameters();
    params.add("name", "Burak");
    params.add("times", 5);

    cli.callAsync("say_hello", params, function(r) {
        if (r instanceof Error) {
            /* do error handling */
        }
        else {
            /* parse data */
        }
    });


this is the new way of calling services:

    cli.easy("say_hello", "Burak", 5, function(r) {
        if (r instanceof Error) {
            /* do error handling */
        }
        else {
            /* parse data */
        }
    });


eliminating param manipulation. this relies on the order that the 
variables appear in the wsdl file, which is in turn the argument order 
in the service executor (i.e. the python soap server in my case) the 
wsdl is requested first time a function from the service is called.

relying on the xml order means a bit abusing the wsdl, but that's fine 
with soaplib. one can easily add an easy_object() function that takes an 
object as a named argument list when needed.

the Object instance passed to soap calls must have a simple_object 
property which is another Object instance that contains nothing but data 
(no functions, no properthes, nothing, just data). soap.Request is a 
fine example.

todo:
1. use qx.io.remote.Request() instead of 
qx.io.remote.transport.XmlHttp.createRequestObject()
2. use events instead of callbacks.
3. use a qx.core.Object compatible serialization scheme.

once those are done, there will be no need to worry about gpl, as every 
component will have been rewritten.

this will mostly complete the soap rpc implementation for qooxdoo.

i'm not sure how to insert events into each request. any ideas? maybe 
giving them as function arguments is the best way anyhow.

awaiting your feedback,

best,
burak







------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to