SabreAMF 0.5

All the credit for this release should go to Jim Mischel. He both found a pretty big bug and pushed for flex' ByteArray support.

Updates/changes

  • Fixed a big typo in AMF0 classmapping
  • Added Flex2 ByteArray support to the AMF3 classmapper. (These data structures map to the SabreAMF_ByteArray class.)

Can be downloaded from here.


7 Responses to SabreAMF 0.5

  1. 282 luchyx 2006-11-29 10:32 pm

    Sabre AMF is moving FAST! cool.

  2. 281 spunkmayer 2006-12-06 3:12 pm

    Testing SabreAMF (both 0.5 and 0.2 versions) with flex following renaun tut on adobe devnet I always get this error

    [06-Dec-2006 17:31:54] PHP Fatal error: Uncaught exception 'Exception' with message 'Unsupported type: 0x04' in c:\php\includes\SabreAMF\AMF0\Deserializer.php:66
    Stack trace:
    #0 c:\php\includes\SabreAMF\Message.php(162): SabreAMF_AMF0_Deserializer->readAMFData(NULL, true)
    #1 c:\php\includes\SabreAMF\Server.php(72): SabreAMF_Message->deserialize(Object(SabreAMF_InputStream))
    #2 c:\www\sabreamf\flex-gateway\DataServicesServer.php(37): SabreAMF_Server->__construct()
    #3 c:\www\sabreamf\gateway.php(35): Flex_DataServicesServer->__construct()
    #4 {main}
    thrown in c:\php\includes\SabreAMF\AMF0\Deserializer.php on line 66

    This is the code I use with flex:

    var ro:RemoteObject = new RemoteObject();
    ro.destination = "SabreAMF";
    ro.source="com.renaun.samples.services.UserService";
    ro.addEventListener("result", onResult);
    ro.addEventListener("fault", onFault);
    ro.getUsers();

    What could it be?

  3. 279 Evert 2006-12-06 5:20 pm

    You are attempting to send a movieclip over the wire.. and this is not supported right now...

    I actually didn't know this was possible at all :) The solution is to not send movieclips, but just the data you need.
    Would you mind sending me a saved session from charles (http://www.xk72.com/charles), So I can examine those packages and see if there's any useful information I can extract from movieclips.. Perhaps some properties are being sent and it would be nice if I was able to decode those..

  4. 280 spunkmayer 2006-12-06 5:53 pm

    Thanks, Evert, I've just found that the problem was with this config line in my php.ini

    zend.ze1_compatibility_mode = On

    Changing it to:

    zend.ze1_compatibility_mode = Off

    everything works fine.

    It is nice to note that the service-config.xml file (on the flex side) is not needed, as the endpoint can be dinamically setted with the RemoteObject "endpoint" property:

    var ro:RemoteObject = new RemoteObject();
    // destination must be setted anyway, as it's a required property
    // but its value is not used
    ro.destination = "RandomDummyString";
    // set the dinamic endpoint
    ro.endpoint = "http://yourserver.com/sabreamf/gateway.php";
    ro.source="com.renaun.samples.services.UserService";
    ro.addEventListener("result", onResult);
    ro.addEventListener("fault", onFault);
    ro.getUsers();

    Thanks anyway for your attention, and for your really useful Sabre!

  5. 284 Evert 2006-12-06 7:49 pm

    Only use 0.5 by the way.. There's lots of bugs fixed since 0.2

  6. 283 Evert 2006-12-06 9:10 pm

    Ah yes.. it is not intended to work with zend engine 1 compat mode..

    There's a lot of differences in PHP4-mode in terms of object handling.. First time I hear people actually using it..

  7. 285 Tom 2007-01-12 2:05 am

    Great work! Thanks for continuing to develop this. The only department it lacks in is documentation for novice users. I'm not sure if you've started writing any for the 1.0 release, but if you need any help let me know!



About

My name is Evert, and I've been writing semi-regularly on this blog since 2006.

I'm currently available for contract work.

more info.

Subscribe

Dropbox

Dropbox is a simple cross-platform online backup and sync application. The first 2GB of space is free, and both you and me get an extra 250MB extra space if you sign up through this link.