Fixes error message encoding issue when using qpid

Making the message only consist of primitive types
before sending it by qpid.

Fixes bug 1242734

Change-Id: I3ff7a19af9a7671f955345ada6acfba8bf573c70
Merge "Fixes error message encoding issue when using qpid"