SWX Service Explorer gotchas, workarounds and roadmap

Although I have implemented quite a few usability enhancements to it, there are still a few gotchas to watch out for when using the SWX Service Explorer in Beta 1.2.

One of these is that you must encode the values that you pass in JSON format yourself. This is a limitation in the original Amfphp service browser that the Explorer is based on. Mostly, this limitation will not affect you with simple data types but there are times when you will get erroneous results unless you this.

For example, if you are passing a string that begins with a number, you must surround it in double quotes to pass it as a string (or else it will be passed as a number and the string portion will be ignored).

To be safe, surround all string values in quotes. In other words, pass "hello, world" instead of hello, world.

You must also be aware of this limitation if you are passing arrays or objects as a value.

The next version of the SWX Service Explorer (Beta 1.3) will handle this encoding for you.

Another gotcha is that leaving an optional parameter's value empty in the Explorer will actually result in that parameter having an empty value, not the default value that's set in the service method. The workaround to this, currently, is to manually enter the default value in Explorer. The next version of Explorer will handle this properly.

Also, Folkert informed me today that the Results panel doesn't automatically close when you change methods. I just updated the Explorer in SVN to implement that and updated the SWX Service Explorer on the SWX public gateway to the latest version.

Finally, you can find the source for the SWX Service Explorer, which you can also use for your Amfphp projects as an updated version of the service browser (just change the gateway to point to gateway.php instead of amf.php) in SVN at http://svn1.cvsdude.com/osflash/swx/trunk/flex/Explorer/. (When I get a moment, I will make an Amfphp-specific build too).

2 Responses to “SWX Service Explorer gotchas, workarounds and roadmap”


  1. 1 Folkert

    Thanks very much for this post. The error makes more sence now.

    1 tiny issue: change the ‘SWXServiceExplorer.swf’ into ‘SwxServiceExplorer.swf’ in ’swxinstall/php/explorer/index.html to make it work. else you have no view ;)

  2. 2 aral

    Hi Folkert,

    You’re very welcome!

    I just fixed the case-sensitivity issue you reported in your comment and the correct version is in SVN. I am in the process of releasing an update (Beta 1.2.1) with that fixed so that it will work on case-sensitive systems. This update will also include the Explorer improvement with the results panel.

Leave a Reply




Bad Behavior has blocked 2996 access attempts in the last 7 days.