Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 656C3D2B9 for ; Tue, 23 Oct 2012 03:39:19 +0000 (UTC) Received: (qmail 18776 invoked by uid 500); 23 Oct 2012 03:39:19 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 18691 invoked by uid 500); 23 Oct 2012 03:39:17 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 17890 invoked by uid 99); 23 Oct 2012 03:39:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2012 03:39:14 +0000 Date: Tue, 23 Oct 2012 03:39:13 +0000 (UTC) From: "Freeman Fang (JIRA)" To: issues@cxf.apache.org Message-ID: <1345985606.14489.1350963554029.JavaMail.jiratomcat@arcas> In-Reply-To: <321094695.14283.1350958332344.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CXF-4594) Incompatible fault type is generated in the wsdl if no setter method in Exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482086#comment-13482086 ] Freeman Fang commented on CXF-4594: ----------------------------------- Hi, Thanks for the patch. A couple of quick issues I found so far, 1. the patch break several checkstyle and PMD rules, 2. moreover, it at least break org.apache.cxf.systest.ws.addr_fromjava.WSAFromJavaTest. A patch shouldn't break any test and also should follow CXF checkstyle and PMD rules. You generally should ensure have "mvn clean install" run successfully from the root pom Freeman > Incompatible fault type is generated in the wsdl if no setter method in Exception > --------------------------------------------------------------------------------- > > Key: CXF-4594 > URL: https://issues.apache.org/jira/browse/CXF-4594 > Project: CXF > Issue Type: Bug > Components: JAXB Databinding > Affects Versions: 2.6.3, 2.7.0 > Reporter: iris ding > Labels: patch > Fix For: 2.7.0 > > Attachments: JAXBContextInitializer.java.patch > > > with the exception class below , it only has a get*** method for the > info property. > @WebFault > public TestException extends Exception { > private String message = null; > public TestException () { > } > public TestException (String message) { > this.message = message; > } > public String getInfo() { > return message; > } > } > With the RI wsgen command, the generated schema type is : > RI: > > > > > > > > If using CXF tool or on the CXF runtime, the generated schema type for the > exception is : > > > > > With the JaxWS spec, 3.7 Service Specific Exception, considering that no > getFaultInfo or faultBean in WebFault annotation is provided, the > special algorithm will be used to map the exception to jaxb bean, one of > the steps write below: > For each getter in the exception and its superclasses, a property of the > same type and name is added to > the bean. All the getter methods except > getMessagefromjava.lang.Throwabletype hierarchy > are excluded from the list of getters to be mapped. > Seems that only getter method is required, with the current codes in static > boolean JAXBContextInitializer.isMethodAccepted, it will check whether the > setter exists. I am thinking that this is not required for this scenario, > as we only need to read the information from the user exception. > The patch will return true is the getter method has no corresponding setter method to let CXF comply with the jax-ws 2.2 spec: > For each getter in the exception and its superclasses, a property of the > same type and name is added to > the bean. All the getter methods except > getMessagefromjava.lang.Throwabletype hierarchy > are excluded from the list of getters to be mapped. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira