[swx] SWX hanging and not returning data

Jake Ketcheson jake at fiveht.com
Mon Apr 14 12:02:41 PDT 2008


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!



More information about the swx mailing list