Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77A1F10C1A for ; Mon, 3 Feb 2014 15:08:44 +0000 (UTC) Received: (qmail 48738 invoked by uid 500); 3 Feb 2014 15:08:43 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 48653 invoked by uid 500); 3 Feb 2014 15:08:40 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 48645 invoked by uid 99); 3 Feb 2014 15:08:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Feb 2014 15:08:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Feb 2014 15:08:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5BB622388868; Mon, 3 Feb 2014 15:08:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1563943 - /activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs Date: Mon, 03 Feb 2014 15:08:18 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140203150818.5BB622388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Mon Feb 3 15:08:17 2014 New Revision: 1563943 URL: http://svn.apache.org/r1563943 Log: https://issues.apache.org/jira/browse/AMQNET-454 applied: https://issues.apache.org/jira/secure/attachment/12626648/Apache.NMS.AMQP-fix-map-message-body-14.patch Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs?rev=1563943&r1=1563942&r2=1563943&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs Mon Feb 3 15:08:17 2014 @@ -196,8 +196,9 @@ namespace Apache.NMS.Amqp { MapMessage mapMessage = message as MapMessage; PrimitiveMap mapBody = mapMessage.Body as PrimitiveMap; - byte[] buf = mapBody.Marshal(); - Message result = new Message(buf, 0, buf.Length); + Dictionary dict = FromNmsPrimitiveMap(mapBody); + + Message result = new Message(dict); return result; } else if (message is StreamMessage) @@ -223,11 +224,17 @@ namespace Apache.NMS.Amqp if ("amqp/map" == message.ContentType) { - // TODO: Return map message + Dictionary dict = new Dictionary(); + message.GetContent(dict); + PrimitiveMap bodyMap = new PrimitiveMap(); + SetNmsPrimitiveMap(bodyMap, dict); + MapMessage mapMessage = new MapMessage(); + mapMessage.Body = bodyMap; + result = mapMessage; } else if ("amqp/list" == message.ContentType) { - // TODO: Return list message + // TODO: Return list message } else {