Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5B2A6200C5B for ; Thu, 27 Apr 2017 10:40:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 59A7B160BB5; Thu, 27 Apr 2017 08:40:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A17E1160B98 for ; Thu, 27 Apr 2017 10:40:00 +0200 (CEST) Received: (qmail 40367 invoked by uid 500); 27 Apr 2017 08:39:59 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 40340 invoked by uid 99); 27 Apr 2017 08:39:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2017 08:39:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 988E8E01BC; Thu, 27 Apr 2017 08:39:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Thu, 27 Apr 2017 08:40:00 -0000 Message-Id: <01f3873ff1d74057ab53001a6f5617f8@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] camel git commit: CAMEL-5723 - update adoc archived-at: Thu, 27 Apr 2017 08:40:01 -0000 CAMEL-5723 - update adoc Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/39d960be Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/39d960be Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/39d960be Branch: refs/heads/master Commit: 39d960be54e2b0d1779388d7ca26b0a8ddb81ab4 Parents: 0351918 Author: onders86 Authored: Thu Apr 27 09:16:56 2017 +0300 Committer: Claus Ibsen Committed: Thu Apr 27 10:36:29 2017 +0200 ---------------------------------------------------------------------- .../camel-jaxb/src/main/docs/jaxb-dataformat.adoc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/39d960be/components/camel-jaxb/src/main/docs/jaxb-dataformat.adoc ---------------------------------------------------------------------- diff --git a/components/camel-jaxb/src/main/docs/jaxb-dataformat.adoc b/components/camel-jaxb/src/main/docs/jaxb-dataformat.adoc index 861381d..84b8584 100644 --- a/components/camel-jaxb/src/main/docs/jaxb-dataformat.adoc +++ b/components/camel-jaxb/src/main/docs/jaxb-dataformat.adoc @@ -88,10 +88,24 @@ generated code does not have @XmlRootElement annotation, sometimes you need unmarshall only part of tree. + In that case you can use partial unmarshalling. To enable this behaviours you need set property `partClass`. Camel will pass this class -to JAXB's unmarshaler. +to JAXB's unmarshaler. If `JaxbConstants.JAXB_PART_CLASS` is set as +one of headers, (even if partClass property is set on DataFormat), the property +on DataFormat is surpassed and the one set in the headers is used. For marshalling you have to add `partNamespace` attribute with QName of -destination namespace. Example of Spring DSL you can find above. +destination namespace. Example of Spring DSL you can find above. +If `JaxbConstants.JAXB_PART_NAMESPACE` is set as +one of headers, (even if partNamespace property is set on DataFormat), the property +on DataFormat is surpassed and the one set in the headers is used. While setting +`partNamespace` through `JaxbConstants.JAXB_PART_NAMESPACE`, please +note that you need to specify its value {[namespaceUri]}[localPart] + +[source,java] +-------------------------------------------------------------------------------------- + ... + .setHeader(JaxbConstants.JAXB_PART_NAMESPACE, simple("{http://www.camel.apache.org/jaxb/example/address/1}address")); + ... +-------------------------------------------------------------------------------------- ### Fragment