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

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

.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
         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.


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

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47653#action_47653 ] 

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

Hi Tim

Could you try out the latest Camel 1.5.1-snapshot and 2.0-snapshot with you test case ?
Please let me know if there is any question :)

Willem



> .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
>             Fix For: 1.5.1, 2.0.0
>
>         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.


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

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-1074.
---------------------------------

    Resolution: Won't Fix

It is a JAXB ObjectFactory issue. 
BTW, you can remove the ObjectFactory , just leave the jaxb.index file along, we can still get a  PersonType instance after unmarshalling.

jaxb.index works for the code first programming model and ObjectFactory is generated for the schema first programming model.

> .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.


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

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-1074:
-----------------------------------

    Assignee: Willem Jiang

> .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.


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

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-1074.
---------------------------------

    Fix Version/s: 1.5.1
                   2.0.0
       Resolution: Fixed

Also updated the wiki page.

> .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
>             Fix For: 1.5.1, 2.0.0
>
>         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.


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

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-1074 started by Willem Jiang.

> .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.


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

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47544#action_47544 ] 

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

I could add an option int he JaxbDataFormat to let it return the value of JAXBElement, so you don't do additional hacking on the ObjectFactory. 

> .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.


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

Posted by "tim mcnamara (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

tim mcnamara reopened CAMEL-1074:
---------------------------------

    Regression: [Broken Unit Test]

This is a workaround and not a fix.   

> .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.


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

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ 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.