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.

Web mentions

Comments

  • luchyx

    luchyx

    Sabre AMF is moving FAST! cool.
  • spunkmayer

    spunkmayer

    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?
  • Evert

    Evert

    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..
  • spunkmayer

    spunkmayer

    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!
  • Evert

    Evert

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

    Evert

    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..
  • Tom

    Tom

    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!