Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 23133 invoked from network); 4 Sep 2007 17:32:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2007 17:32:03 -0000 Received: (qmail 46522 invoked by uid 500); 4 Sep 2007 17:31:57 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 46475 invoked by uid 500); 4 Sep 2007 17:31:57 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 46466 invoked by uid 99); 4 Sep 2007 17:31:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 10:31:57 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.79.194.121] (HELO mesa2.com) (64.79.194.121) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 17:31:51 +0000 Received: from [12.170.54.130] (account jdkulp HELO dilbert.boston.amer.iona.com) by mesa2.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 1232486; Tue, 04 Sep 2007 13:31:29 -0400 From: Daniel Kulp To: cxf-dev@incubator.apache.org Subject: Re: where is "required" property added to XMLElement annotation? Date: Tue, 4 Sep 2007 13:31:28 -0400 User-Agent: KMail/1.9.7 Cc: Glen Mazza References: <1188855565.22924.7.camel@gmazza-desktop> In-Reply-To: <1188855565.22924.7.camel@gmazza-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709041331.29163.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Glen, On Monday 03 September 2007, Glen Mazza wrote: > During wsdl2java generation, where in our code is the "required" > property added to the @XMLElement annotation? I would like to supply > a patch for CXF-963[1] that will stop adding this property to this > annotation. That is generated in the JAXB code, not CXF. Not much you can do about it. The reason Metro might be generating things differently is they may be using a different version of JAXB. They may be up to 2.1 since they are targetting JAX-WS 2.1 right now. > (BTW, if someone knows if I was wrong in my analysis of CXF-963, i.e., > required *is* a valid property for the XMLElement annotation, please > advise.) required is definitely a valid property of XmlElement annotation. If you check the JAXB spec, section 8.9.1 defines the XmlElement annotation as: @Retention(RUNTIME) @Target({FIELD, METHOD} public @interface XmlElement { String name() default "##default" ; // name for XML elemen boolean nillable() default false; boolean required() default false; String namespace() default "##default" ; Class type() default DEFAULT.class; String defaultValue() default "\u0000"; static final class DEFAULT {} } required is in there. Dan > > Thanks, > Glen > > [1] https://issues.apache.org/jira/browse/CXF-963 -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 daniel.kulp@iona.com http://www.dankulp.com/blog