camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller (Commented) (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4942) exchange.getIn().getBody(<SomeClass>.class) throws an exception for Jaxb model objects
Date Fri, 27 Jan 2012 11:56:41 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-4942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194616#comment-13194616
] 

Christian Müller commented on CAMEL-4942:
-----------------------------------------

Thank you Babak! I will be the sponsor for your beer the next time we meet. :-)
                
> 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.9.0
>            Reporter: Christian Müller
>            Assignee: Babak Vahdat
>         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

       

Mime
View raw message