I'm sending MapMessages in Java to ActiveMQ and retrieving them using Stomp in PHP. My message creation code looks like this:
MapMessage message = session.createMapMessage();
message.setInt("id", 42);
message.setInt("status", 42);
message.setString("result", "aString");
When I retrieve them in PHP, the array that's created looks like this:
Array (
[map] => Array (
[0] => Array (
[entry] => Array (
[0] => Array (
[string] => id
[int] => 42
)
[1] => Array (
[string] => status
[int] => 42
)
[2] => Array (
[string] => Array (
[0] => result
[1] => aString
)
)
)
)
)
)
What am I supposed to do with that? Is there a way to convince Stomp to unserialize it in a reasonable manner or is there some PHP incantation make accessing this array less painful? In particular, I can't just iterate through the entries and build an associative array because the array looks completely different if there is a string & int as opposed to two strings.