[swx] Passing complex args to call

Ben Lagoutte ben.lagoutte at gozer.com.au
Thu Nov 29 17:09:43 PST 2007


Hi,

I'm running into a bit of a problem here.

How does one pass complex args to a swx call?

If I pass regular value types like number of strings it's fine, but I 
need to pass a more complex type (array or object) back to PHP.

with for instance:

data = {Total: 5000, Params: [45, 65, 87] }

and calling swx with these parameters

        var swx:SWX = new SWX();
        swx.gateway = "http://testserver.dev/swx/php/swx.php";
        swx.encoding = "POST";
        swx.debug = true;
        swx.timeout = 10;

        var callParameters:Object =
        {
            serviceClass: "TestService",
            method: "SaveData",
            args: [data],
            result: [this,callbackSuccess],
            timeout: [this,callbackTimeout],
            fault: [this,callbackError]
        }

The call always fails after a short wait time with this message: Error 
opening URL 'http://testserver.dev/swx/php/swx.php'

The gateway url is definitely fine, it works if I do a test with a 
single number as a parameter.

I'm finding the documentation close to non-existent in the complex args 
area.

Has anybody got any idea what I'm missing or doing wrong?

Much appreciated for your help.

Cheers
Ben

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20071130/ba37a39e/attachment.html 


More information about the swx mailing list