You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Christian Müller (Updated JIRA)" <ji...@apache.org> on 2012/01/26 07:17:40 UTC
[jira] [Updated] (CAMEL-4942)
exchange.getIn().getBody(.class) throws an exception for Jaxb
model objects
[ https://issues.apache.org/jira/browse/CAMEL-4942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Müller updated CAMEL-4942:
------------------------------------
Attachment: test.zip
Test which shows the issue
> exchange.getIn().getBody(<SomeClass>.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.6.0
> Reporter: Christian Müller
> Attachments: test.zip
>
>
> {code}
> exchange.getIn().getBody(Foo.class);
> {code}
> should return a Foo instance or null, if no suitable type converter is available. The java doc says: "return the body of the message as the specified type, or <tt>null</tt> 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 another 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 administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira