[swx] SWX hanging and not returning data

Ben Lagoutte ben.lagoutte at gozer.com.au
Wed Apr 16 15:59:33 PDT 2008


It's strange that in your output you get

SWX.call INFO: No timeout handler defined.


Where you clearly have

timeout: [this, timeoutHandler],


in your original posted code.

You don't seem to have any fault handler defined in the original code.. 
could be useful to capture that.

You could also try using an http proxy (i use Charles 
<http://www.xk72.com/charles/> but there are plenty others out there) to 
see what the server response really is.

ben

Jake Ketcheson wrote:
> <Root><Email>jake at fiveht.com</Email><Password>password</Password><Savecookie>1</Savecookie></Root>
> SWX.call INFO: No progress handler defined.
> SWX.call INFO: No timeout handler defined.
> SWX.call INFO: No fault handler defined.
> ExternalAsset.load() info: Sending data using POST encoding.
> SWX.prepare: _level0.SWXLoadManagerClip.holder0.innerHolder
>
> This is where it hangs, eventually it throws back an error with loading 
> the url, but it works fine with a shorter string.. And also works fine 
> if I just put it online and test it from the server.
>
> ben wrote:
>   
>> Hi Jake,
>>
>> Can you post an example of those strings that's too long?
>>
>> Ben
>>
>> Jake Ketcheson wrote:
>>     
>>> Hi everyone,
>>>
>>> Thanks for the replys but the problem doesn't seem to be with my 
>>> internet connection (ie. there is no firewall setup).
>>> I've found that it will not send XML strings beyond a certain length, 
>>> ie.. one extra character over and it fails, one under and it goes 
>>> through fine.
>>> This problem doesn't appear when its on the web server.
>>>
>>> All I know is its quite bizarre.
>>>
>>> ben wrote:
>>>   
>>>       
>>>> 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
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>   
>>>       
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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/20080417/02341bc0/attachment.html 


More information about the swx mailing list