Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 84789 invoked from network); 6 Dec 2010 19:09:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Dec 2010 19:09:21 -0000 Received: (qmail 72298 invoked by uid 500); 6 Dec 2010 19:09:20 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 72236 invoked by uid 500); 6 Dec 2010 19:09:20 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 72228 invoked by uid 99); 6 Dec 2010 19:09:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Dec 2010 19:09:20 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Dec 2010 19:09:13 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 45FE7187284; Mon, 6 Dec 2010 14:08:52 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-users@cxf.apache.org.FJDyyxcl1J Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id 599C418727F; Mon, 6 Dec 2010 14:08:51 -0500 (EST) From: Daniel Kulp To: users@cxf.apache.org Subject: Re: JAXB class name customization Date: Mon, 6 Dec 2010 14:09:15 -0500 User-Agent: KMail/1.13.5 (Linux/2.6.36; KDE/4.5.3; x86_64; ; ) Cc: Bruno Dusausoy References: <4CF80377.3050206@yp5.be> <76770d4aba26533aff172bd64b007d47@localhost> <88b4771f8a5fe3bb5d2ee358b8661f0c@localhost> In-Reply-To: <88b4771f8a5fe3bb5d2ee358b8661f0c@localhost> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201012061409.15963.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-102.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.1 On Monday 06 December 2010 6:20:51 am Bruno Dusausoy wrote: > On Mon, 06 Dec 2010 10:04:12 +0100, Bruno Dusausoy > wrote: > > [...] > > > Well, you were right, kinda ;). > > My XPath expression was ok, but I had to add a child condition to it, > > > > like this : > > > > > schemaLocation="xml/schema/Loopbaan/B2BExchanges_V1.xsd" > > > > node="//xs:complexType[@name='Response74LSignalStruct']//xs:element[@name > > ='Activities']/xs:complexType"> > > > > > > > > > > > > The "/xs:complexType" at the end is what was missing. > > > > Everything's ok now. > > > > Thanks. > > By the way, can someone tell me why the aforementioned solution works ? > Why must I add "/xs:complexType" at the end of the XPath expression ? > > I like to know the why's :). Well, in JAXB, the generated classes represent the TYPES in the schema. You can have JAXB also generate classes for the Elements (that would then subclass JAXBElement), but normally the generated code just represents the types. The complexType thing above makes the customization properly apply to the type. -- Daniel Kulp dkulp@apache.org http://dankulp.com/blog