You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2008/11/13 08:52:05 UTC

[jira] Commented: (CAMEL-1074) .unmarshal(new JaxbDataFormat("com.foo.bar")) returning JAXBElement

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

Willem Jiang commented on CAMEL-1074:
-------------------------------------

The JAXBElement is create by the ObjectFactory's "public JAXBElement<PersonType> createPerson(PersonType value) " method.
You can get the PersonType instance by calling the JAXBElement's getValue() method.

If you just want to get the PersonType after the unmashalling, you just need to comment out the JAXBElement createPerson method.
May be you can tell xjc don't create the JAXBElement by passing some arguments when you generate the code from xsd.



> .unmarshal(new JaxbDataFormat("com.foo.bar")) returning JAXBElement
> -------------------------------------------------------------------
>
>                 Key: CAMEL-1074
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1074
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jaxb
>    Affects Versions: 1.4.0
>         Environment: java 1.5
>            Reporter: tim mcnamara
>            Assignee: Willem Jiang
>         Attachments: camel-jaxb.zip
>
>
> using .unmarshal(new JaxbDataFormat("com.foo.bar") is returning a JAXBElement instead of the desired object that was generated by xjc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.