14. January 2011

How to introspect AMF communication

BlazeDS provides optimized binary protocol for transfering data known as AMF protocol.

AMF is fast and it has support for transfer of complex objects. Specification of AMF is available at opensource.adobe.com.

The only problem is how to introspect it?

AMF is binary. Therefore normal POST dump or Wireshark dump are not useful.

One solution was to use Flash Builder, but it is quite big and it requires big installation and license and so on.

Piotr Walczyszyn released incredibly simple and powerful AMF introspection tool – Toaster Lite. It acts as a proxy and it decodes all requests and responses.

Just install it. It’s quite small. Configure port and that’s it 🙂

Check out Piotr’s blog with video tutorial.

3. January 2011

pyamf.DecodeError: Array type required for request body

PyAMF is quite handy library for building apps that communicate with BlazeDS servers via AMF protocol.

Manual says that you should use setCredential to authenticate client.

The only problem is that PyAMF throws strange error after calling any method from remote service:

pyamf.DecodeError: Array type required for request body (ticket 711)

This is quite misleading error message. In this case it means that you do not have correct credentials. Check your user name and password in setCredential method. 😉