The upcoming RC1 release has a major change that may break your existing applications. Until this version, the only supported root data type was an array. Everything was returned wrapped in an array. So, for example, if your service class returned the boolean false, it would arrive in Flash through SWX RPC as [false] and you would have to reference it as result[0].
This is was counter-intuitive and wrong but simple to implement initially when I was creating the SWX Assembler for SWX PHP.
Now that SWX RPC is its own protocol, this has to change. The root data type of a returned value in SWX RPC can be boolean, string, number, null, object and array.
This means that if your service classes return simple data types, they will no longer be wrapped in an array. Instead of accessing them as result[0] in your applications, you will simply access them as result.
This change was, unfortunately, necessary. I realize that it will break some of your existing applications.
I am doing a sweep of the existing examples and updating them for RC1, due this weekend (finally!) If you're using the Public SWX gateway for your applications, I suggest that you get the latest version of SWX from the Subversion repository and check your own applications against it as well. I will be updating the Public SWX gateway to RC1 once RC1 is released for download.

1 Responses to “Heads up: Major change in RC1 may break your apps.”
Leave a Reply