You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/01/19 17:57:43 UTC

[jira] Commented: (CAMEL-2381) Partial marshalling and unmarshalling

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

Claus Ibsen commented on CAMEL-2381:
------------------------------------

You must not use ObjectHelper.loadClass directly
{code}
+        if (partClass != null) {
+            setProperty(dataFormat, "partClass", ObjectHelper.loadClass(partClass));
+        }
{code}

What you need is to obtain classResolver from CamelContext as it can provide you with the correct one to use. This also works in OSGi environments then.

You may then need to lazy load the class in camel-jaxb when you have a reference to the Exchange from the marshal / unmarshal methods.

> Partial marshalling and unmarshalling
> -------------------------------------
>
>                 Key: CAMEL-2381
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2381
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jaxb
>    Affects Versions: 2.1.0
>            Reporter: Łukasz Dywicki
>            Assignee: Łukasz Dywicki
>         Attachments: jaxb-partial-support.patch
>
>
> JAXB 2 supports partial (un)marshalling. With current version of camel-jaxb it is not possible to use this feature.
> Partial unmarshalling
> https://jaxb.dev.java.net/guide/_XmlRootElement_and_unmarshalling.html
> Partial marshalling
> http://weblogs.java.net/blog/kohsuke/archive/2005/10/101_ways_to_mar.html

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