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 3F30D9731 for ; Fri, 27 Jan 2012 20:14:34 +0000 (UTC) Received: (qmail 84226 invoked by uid 500); 27 Jan 2012 20:14:34 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 84197 invoked by uid 500); 27 Jan 2012 20:14:33 -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 84186 invoked by uid 99); 27 Jan 2012 20:14:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 20:14:33 +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 20:14: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 59B18135B99 for ; Fri, 27 Jan 2012 20:14:10 +0000 (UTC) Date: Fri, 27 Jan 2012 20:14:10 +0000 (UTC) From: "Babak Vahdat (Resolved) (JIRA)" To: issues@camel.apache.org Message-ID: <1948043806.1627.1327695250368.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1767104775.79577.1327558540037.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CAMEL-4942?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Babak Vahdat resolved CAMEL-4942. --------------------------------- Resolution: Fixed Back-ported to both 2.8.x & 2.9.x branches as well. =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.5, 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