Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 37106 invoked from network); 19 Sep 2007 11:59:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2007 11:59:07 -0000 Received: (qmail 69910 invoked by uid 500); 19 Sep 2007 11:58:59 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 69896 invoked by uid 500); 19 Sep 2007 11:58:58 -0000 Mailing-List: contact cxf-issues-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-issues@incubator.apache.org Received: (qmail 69887 invoked by uid 99); 19 Sep 2007 11:58:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 04:58:58 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 12:01:02 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D52517141FE for ; Wed, 19 Sep 2007 04:58:43 -0700 (PDT) Message-ID: <8161856.1190203123869.JavaMail.jira@brutus> Date: Wed, 19 Sep 2007 04:58:43 -0700 (PDT) From: "Garry Watkins (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Updated: (CXF-1032) @WebMethod (exclude = true) are not being excluded In-Reply-To: <27116314.1190118524000.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Garry Watkins updated CXF-1032: ------------------------------- Sorry, I am not an expert with all of the annotations. XmlTransient should work per spec, however, when I change the above code it gives me the following: JAXB annotation is placed on a method that is not a JAXB property this problem is related to the following location: at @javax.xml.bind.annotation.XmlTransient() ... So is that a bug in other parts of the code? > @WebMethod (exclude = true) are not being excluded > --------------------------------------------------- > > Key: CXF-1032 > URL: https://issues.apache.org/jira/browse/CXF-1032 > Project: CXF > Issue Type: Bug > Components: JAXB Databinding > Affects Versions: 2.0.1 > Environment: Mac OS/X JDK 1.5 > Reporter: Garry Watkins > > Methods with @WebMethod(exclude = true) are still being included when bringing in classes that will have WSDL generated. I have tracked down the issue to the org.apache.cxf.jaxb.JAXBContextInitializer class. > I have included the replacement method here > private void walkReferences(Class cls) { > if (cls.getName().startsWith("java.") > || cls.getName().startsWith("javax.")) { > return; > } > //walk the public fields/methods to try and find all the classes. JAXB will only load the > //EXACT classes in the fields/methods if they are in a different package. Thus, > //subclasses won't be found and the xsi:type stuff won't work at all. > //We'll grab the public field/method types and then add the ObjectFactory stuff > //as well as look for jaxb.index files in those packages. > > Field fields[] = cls.getFields(); > for (Field f : fields) { > addType(f.getGenericType()); > } > Method methods[] = cls.getMethods(); > for (Method m : methods) { > // START The following lines were added by GW > WebMethod wm = m.getAnnotation(WebMethod.class); > if (null != wm){ > if (wm.exclude()){ > System.out.println("Skipping method " + m.toString()); > continue; > } > } > //END GW > addType(m.getGenericReturnType()); > for (Type t : m.getGenericParameterTypes()) { > addType(t); > } > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.