Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26EE497C7 for ; Fri, 27 Jan 2012 15:46:33 +0000 (UTC) Received: (qmail 91968 invoked by uid 500); 27 Jan 2012 15:46:33 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 91931 invoked by uid 500); 27 Jan 2012 15:46:32 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 91922 invoked by uid 99); 27 Jan 2012 15:46:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 15:46:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 15:46:31 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 7581C1358A4 for ; Fri, 27 Jan 2012 15:46:11 +0000 (UTC) Date: Fri, 27 Jan 2012 15:46:11 +0000 (UTC) From: =?utf-8?Q?Christian_M=C3=BCller_=28Commented=29_=28JIRA=29?= To: issues@camel.apache.org Message-ID: <820946893.485.1327679171483.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1767104775.79577.1327558540037.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-4942) exchange.getIn().getBody(.class) throws an exception for Jaxb model objects MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-4942?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1319= 4861#comment-13194861 ]=20 Christian M=C3=BCller commented on CAMEL-4942: ----------------------------------------- I don't think this issue is really urgent because: - it exists at least since release 2.6.0 - our users has workarounds for this So, let's fix it in 2.8.5 if there is no other reason to build a new releas= e version for 2.8.4... =20 > exchange.getIn().getBody(.class) throws an exception for Jaxb = model objects > -------------------------------------------------------------------------= ------------- > > Key: CAMEL-4942 > URL: https://issues.apache.org/jira/browse/CAMEL-4942 > Project: Camel > Issue Type: Bug > Components: camel-core, camel-jaxb > Affects Versions: 2.8.3 > Reporter: Christian M=C3=BCller > Assignee: Babak Vahdat > Fix For: 2.8.4, 2.9.1, 2.10.0 > > Attachments: test.zip > > > {code} > exchange.getIn().getBody(Foo.class); > {code} > should return a Foo instance or null, if no suitable type converter is av= ailable. The java doc says: "return the body of the message as the specifie= d type, or null if not possible to convert" > If Foo is an Jaxb object model, this method call: > - throws an org.xml.sax.SAXParseException if the body content is a string > - throws a javax.xml.bind.UnmarshalException if the body content is anoth= er Jaxb model object > Please have a look on the attached sample eclipse project. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira