SWX: SWF Data Format

Icon

SWX is the native data format for Adobe Flash. This blog is about all things SWX, SWX RPC, SWX PHP and the SWX APIs (Flickr, Twitter, etc.)

Towards a friendlier SWX Service Explorer

In the past few days, I've been working on making the SWX Service Explorer a friendlier beast. Today, prompted by the error Kelvin Luck reported, I added better error handling that should help with a common issue that people may run into with Beta 1.1: The problem with the incorrect default gateway URL.

The problem

The error that Kelvin ran into happens when the SWX Service Explorer cannot find the AMF gateway that it uses. This can occur due to two reasons: Firstly, if your server is down or you are disconnected from your server/Internet/etc., and secondly, if the the SWX Service Explorer is configured with the wrong URL to the AMF gateway. The latter is the default case with the Explorer in Beta 1.1 because I couldn't obtain the source for it (it's based on the service browser in AMFPHP) in time for that release. It means that you have to configure the SWX Service Explorer to the correct Gateway URL (change gateway.php to amf.php) before you can use it. Otherwise, you currently get the cryptic error message that Kelvin got.

The solution

I now have the source and have begun to implement improvements to the Explorer, including changing the default Gateway URL in the SWX MAMP Bundle so that it now points to the AMF gateway in SWX (which is the file amf.php in the php folder, as opposed to the file gateway.php in AMFPHP.) So, hopefully, starting with Beta 1.2, this issue should become much less common (at least when running SWX using the SWX MAMP Bundle).

However, because the same error can surface if the server is not running (and if the Gateway URL is not configured properly when running SWX on your own server, without the SWX MAMP Bundle), I also added better handling for the error.

Specifically, you now receive the following error message if the gateway cannot be reached:

Swx Service Explorer new Error Message

Beyond stating the problem in a simple manner, it also shows you the Gateway URL (which you can click on to test if the gateway is reachable in the browser) and also provides easy access to the Preferences window so you can change the Gateway URL if you need to.

I hope this helps makes working with the SWX Service Explorer easier for you guys.

One Response

  1. braini says:

    Hello aral,

    I have an alike problem. My SWX explorer
    (http://localhost/cakePHP_and_SWX_downloaded_files/swx_deployment_bundle/unzipped/php/explorer/)
    is showing me always the same error box:

    (mx.rpc::Fault)#0
    errorID = 0
    faultCode = “Client.Error.MessageSend”
    faultDetail = “Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: ‘http://localhost/cakePHP_and_SWX_downloaded_files/swx_deployment_bundle/unzipped/php/amf.php’”
    faultString = “Send failed”
    message = “faultCode:Client.Error.MessageSend faultString:’Send failed’ faultDetail:’Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: ‘http://localhost/cakePHP_and_SWX_downloaded_files/swx_deployment_bundle/unzipped/php/amf.php””
    name = “Error”
    rootCause = (Object)#1
    code = “NetConnection.Call.BadVersion”
    description = “”
    details = “”
    level = “error”

    what to do now?