Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 456DCE564 for ; Mon, 17 Dec 2012 18:24:13 +0000 (UTC) Received: (qmail 52826 invoked by uid 500); 17 Dec 2012 18:24:13 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 52782 invoked by uid 500); 17 Dec 2012 18:24:13 -0000 Mailing-List: contact issues-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 issues@camel.apache.org Received: (qmail 52763 invoked by uid 99); 17 Dec 2012 18:24:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2012 18:24:12 +0000 Date: Mon, 17 Dec 2012 18:24:12 +0000 (UTC) From: =?utf-8?Q?Christian_M=C3=BCller_=28JIRA=29?= To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-5278) Allow JaxbDataFormat to (un)marshall with strict schema validation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-5278?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1353= 4145#comment-13534145 ]=20 Christian M=C3=BCller commented on CAMEL-5278: ----------------------------------------- I don't think it makes sense to have the methods "setMarshallerSchema" and = "setUnMarshallerSchema". In which case they are different? I propose the following API: {code} DataFormat jaxb =3D new JaxbDataFormat("com.acme.model"); jaxb.setSchema("locationOfTheSchema"); {code} and {code} {code} Instead of "schema", we can also use "schemaLocation"... If a schema is specified, the validation is enabled for marshalling *AND* u= nmarshalling. If the user only want the validation for one of them, he can = simple define two JAXB data formats which are pointing to the same JAXB con= text path. One with the schema specified and one without. =20 > Allow JaxbDataFormat to (un)marshall with strict schema validation=20 > ------------------------------------------------------------------- > > Key: CAMEL-5278 > URL: https://issues.apache.org/jira/browse/CAMEL-5278 > Project: Camel > Issue Type: Improvement > Components: camel-jaxb > Affects Versions: 2.9.2 > Reporter: Frank Kootte > Assignee: Christian M=C3=BCller > > Currently JaxbDataFormat does not allow to (un)marshall payloads with str= ict schema validation. I would like to propose to add 2 methods called set(= Un)MarshallerSchema which could either be 1:1 proxies to the JAXB (Un)Marsh= aller methods or provide a somewhat more convenient signature delegating th= e work to the JaxbDataFormat to allow the call site code to be more concise= .=20 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira