[swx] SWX hanging and not returning data
ben
ben_da_dog at yahoo.co.uk
Tue Apr 15 15:46:38 PDT 2008
Also, since you deal with XML you might want to use the SWXml library to
parse your results:
http://www.video-flash.de/index/swxml-xml-api-for-swx/
Ben
holger arndt wrote:
> Hi Jake,
> i've tested your swx-explorer (http://www.pizzaordering.com.php5-6.websitetestlink.com/swx/php/explorer
> ) and copy-pasted the code you listed.
> it works fine, both the explorer and the flash file (locally).
> The only "probelm" is that the system returns the following message:
> "<Root><Status>0</Status><Message>Cannot Perform This Customer
> Function Until Store Has Been Selected</Message></Root>"
> So since you don't get this and have an URL error, i guess you have a
> firewall problem.
> did you block flash? test it and upload the swf onto your webserver
> and test it there, your browser doesn't seem to have been blocked
> the code seems fine as it is
>
> Cheers,
> Holger Arndt
>
> Am 14.04.2008 um 21:02 schrieb Jake Ketcheson:
>
>
>> So I have a problem.
>> We've had a coder come in and create a cart system in PHP that demands
>> XML strings being sent to it from swx.
>> Now from flash whenever I try and test the system it comes back as:
>> Error opening URL
>> 'http://www.pizzaordering.com.php5-6.websitetestlink.com/swx/php/swx.php
>> "'
>> Rewriting the original code is not an option at this point.
>> Now I know this url exists, the explorer works fine and returns data..
>> But when I try and test from my local machine nothing works, and
>> nothing
>> shows up in the data analyzer.
>>
>> Here's the button code:
>>
>> on(release){
>> System.security.allowDomain('*');
>>
>> customerData
>> ="<Root><Email>email at email.com</Email><Password>password</
>> Password><Savecookie>1</Savecookie></Root>";
>>
>> trace(customerData);
>> import org.swxformat.*;
>> var swx:SWX = new SWX();
>> swx.gateway =
>> "http://www.pizzaordering.com.php5-6.websitetestlink.com/swx/php/swx.php
>> ";
>> swx.encoding = "POST";
>> // Set call details. var callDetails:Object =
>> {
>> serviceClass: "Customer",
>> method: "Login",
>> args: [customerData],
>> result: [this, resultHandler],
>> timeout: [this, timeoutHandler],
>> debug: true
>> }
>> // Carry out SWX call.
>> swx.call(callDetails);
>> // Set status display.
>> _root.contentSpace.addedToOrder.gotoAndPlay("s1")
>>
>> _root.note= "Waiting for data";
>> function resultHandler(event:Object)
>> {
>> // Display the results.
>> //status.text = "";
>> //_root.contentSpace.addedToOrder.gotoAndPlay("s2")
>> _root.note= event.result;
>>
>> }
>>
>> function timeoutHandler(event:Object)
>> {
>> // Call timed out.
>> isLoading(false);
>> status.text = "The call timed out. Please try again.";
>> }
>> }
>>
>> I've tried this with just a simple none-xml string, an empty string..
>> None of it works and just hangs after the initial onrelease.
>>
>> Thanks for your help!
>>
>> _______________________________________________
>> swx mailing list
>> swx at osflash.org
>> http://osflash.org/mailman/listinfo/swx_osflash.org
>>
>
>
> _______________________________________________
> swx mailing list
> swx at osflash.org
> http://osflash.org/mailman/listinfo/swx_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20080416/b6620254/attachment.html
More information about the swx
mailing list