activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwalter <patrick.wal...@nasa.gov>
Subject Byte Arrays In IMapMessage
Date Tue, 12 Feb 2013 13:10:41 GMT
Trying to add a byte[] as an item in an IMapMessage...

IMapMessage message = producer.getSession().CreateMapMessage();

string sval = "STRANGE BYTES FROM WORD DOC:
üøôðôìèìäôìàìÜìÜìÜìÜàìàØàìÔÐÔÐÌÈÌÐ";
byte[] bytes = Encoding.UTF8.GetBytes(sval);
message.Properties.SetBytes("TEST-ByteArray", bytes);

It fails on the SetBytes() method.  IS THERE A BETTER WAY TO SET BYTES IN A
MAP MESSAGE??

Thanks


Errors and Failures:
1) Test Error :
ProducerSendConsumerReceive.TestFixture1.TestConsumerSupport_set MessageBody
   Apache.NMS.MessageFormatException : Byte Arrays not allowed in this
PrimitiveMap
  ----> System.NotSupportedException : Byte Arrays not allowed in this
PrimitiveMap
   at Apache.NMS.Util.PrimitiveMapInterceptor.SetObjectProperty(String name,
Object value) in
c:\dev\NMS\src\main\csharp\Util\PrimitiveMapInterceptor.cs:line 95

   at Apache.NMS.Util.MessagePropertyIntercepter.SetObjectProperty(String
name, Object value) in
c:\dev\NMS\src\main\csharp\Util\MessagePropertyIntercepter.cs:line 93
   at Apache.NMS.Util.PrimitiveMapInterceptor.SetBytes(String key, Byte[]
value, Int32 offset, Int32 length) in
c:\dev\NMS\src\main\csharp\Util\PrimitiveMapInterceptor.cs:line 411
   at Apache.NMS.Util.PrimitiveMapInterceptor.SetBytes(String key, Byte[]
value)
 in c:\dev\NMS\src\main\csharp\Util\PrimitiveMapInterceptor.cs:line 404
   at ProducerSendConsumerReceive.TestFixture1.addMessageData(IMessage
message)
in
C:\work\dev\trunk\common\Project\FreeFlyerExtensions\TrajService\Test\FDSMessagingConsumerSupportTest\ConsumerSupportTest\TestFixture.cs:line
105
   at
ProducerSendConsumerReceive.TestFixture1.TestConsumerSupport_setMessageBody()
in C:\work\dev\trunk\common\Project\FreeFlyerExtensions\TrajService\Test\FDS
Messaging\ConsumerSupportTest\ConsumerSupportTest\TestFixture.cs:line 29
--NotSupportedException
   at Apache.NMS.Util.PrimitiveMapInterceptor.SetObjectProperty(String name,
Object value) in
c:\dev\NMS\src\main\csharp\Util\PrimitiveMapInterceptor.cs:line 88









--
View this message in context: http://activemq.2283324.n4.nabble.com/Byte-Arrays-In-IMapMessage-tp4663255.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message