Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 96601DEB7 for ; Thu, 14 Feb 2013 17:28:51 +0000 (UTC) Received: (qmail 55566 invoked by uid 500); 14 Feb 2013 17:28:51 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 55541 invoked by uid 500); 14 Feb 2013 17:28:51 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 55532 invoked by uid 99); 14 Feb 2013 17:28:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 17:28:50 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of davidkarlsen@gmail.com designates 209.85.219.47 as permitted sender) Received: from [209.85.219.47] (HELO mail-oa0-f47.google.com) (209.85.219.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 17:28:46 +0000 Received: by mail-oa0-f47.google.com with SMTP id o17so2772492oag.6 for ; Thu, 14 Feb 2013 09:28:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=plop1Ev4baR7+SqlD7VsUN2voc2IBQ+H8lLvWjwwTZc=; b=qGtKMHkrcf2I7q0OjjblUXam0ouORsPwjGk/ozys91JOd83S3o+yZed7dq1xo+ciTC 5P66+8hUESyyluhSdymb4Mp8r8/gdffSJuF5g5KzUegpEWlWqs8jgJ0P4ZZD/uwBrtZH mEd6o0EIHF80tzkCo/KhFLGqXoR63fa8pXdQuhf2pL/zBlSmgAy+ONEDB4TaLadVbTnJ Txryw7O9lsTCCwf6rK3bFL/NQ4PLJA73hHqxS/4AUivuNhWRKph04lfMf06y8WhJhEKY dbVdBLWs5QjXq9/1Zm6jqT1KqegKeveYzQSKSVc5d++8QqfZN2wWH1R95JVEuuuYCTBe ouLA== MIME-Version: 1.0 X-Received: by 10.60.1.225 with SMTP id 1mr20047526oep.141.1360862906307; Thu, 14 Feb 2013 09:28:26 -0800 (PST) Received: by 10.76.170.103 with HTTP; Thu, 14 Feb 2013 09:28:26 -0800 (PST) Received: by 10.76.170.103 with HTTP; Thu, 14 Feb 2013 09:28:26 -0800 (PST) In-Reply-To: References: <1360792007924-5727563.post@n5.nabble.com> <1360855368660-5727605.post@n5.nabble.com> Date: Thu, 14 Feb 2013 18:28:26 +0100 Message-ID: Subject: Re: Always receive String Message even with jmsMessageType set to Bytes From: David Karlsen To: users@camel.apache.org Content-Type: multipart/alternative; boundary=e89a8fb1fbba1e538c04d5b2963d X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb1fbba1e538c04d5b2963d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Oh- of course. I overlooked the fact that it was a consuming route. Btw. Wmq sets a custom IBM prefixed property defining the sending charset. Ping me directly if you want me to look it up tomorrow at work where I have the code. Den 14. feb. 2013 16:44 skrev "Claus Ibsen" f=F8lgende: > On Thu, Feb 14, 2013 at 4:22 PM, yxzhao wrote: > > We can verify that if the MQ message is sent with MQMessage.format =3D > > MQConstants.MQFMT_STRING, then our route will receive text message. > > Otherwise, it will receive a byte array. Actually, the sending app uses > the > > same write bytes method to put the message into the queue. The same > message > > can be received as bytes when using MQMessage.readFully method. > > > > Also, we need to know the charset that camel/jms uses to convert the > bytes > > into string to revert the text message back to bytes since we need to g= et > > the original binary values. > > > > It is not Camel doing anything there. Camel uses the JMS Client to get th= e > data. > > Camel receives a javax.jms.Message which comes in different > implementations. > So Camel check if instanceof TextMessage, then its a text. If > instanceof BytesMessages its a bytes message etc. > > Under the hood its the JMS client, and in your case IBM WebSphere > being the JMS client. > > > > Any suggestions? > > > > > > > > > > -- > > View this message in context: > http://camel.465427.n5.nabble.com/Always-receive-String-Message-even-with= -jmsMessageType-set-to-Bytes-tp5727563p5727605.html > > Sent from the Camel - Users mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > FuseSource is now part of Red Hat > Email: cibsen@redhat.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > --e89a8fb1fbba1e538c04d5b2963d--