Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 42356 invoked from network); 28 Aug 2007 19:08:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Aug 2007 19:08:03 -0000 Received: (qmail 57709 invoked by uid 500); 28 Aug 2007 19:07:58 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 57684 invoked by uid 500); 28 Aug 2007 19:07: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 57675 invoked by uid 99); 28 Aug 2007 19:07:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2007 12:07:58 -0700 X-ASF-Spam-Status: No, hits=-99.8 required=10.0 tests=ALL_TRUSTED,WHOIS_MYPRIVREG 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; Tue, 28 Aug 2007 19:08:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 90B8C71420F for ; Tue, 28 Aug 2007 12:07:31 -0700 (PDT) Message-ID: <18645713.1188328051589.JavaMail.jira@brutus> Date: Tue, 28 Aug 2007 12:07:31 -0700 (PDT) From: "Daniel Kulp (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Updated: (CXF-899) Missing getFaultInfo() fallback patch - use @WebFault bean as faultInfo if getFaultInfo() is not present In-Reply-To: <15516911.1186589219112.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-899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp updated CXF-899: ---------------------------- Fix Version/s: 2.0.2 Assignee: Daniel Kulp Affects Version/s: (was: 2.1) 2.0.1 > Missing getFaultInfo() fallback patch - use @WebFault bean as faultInfo if getFaultInfo() is not present > -------------------------------------------------------------------------------------------------------- > > Key: CXF-899 > URL: https://issues.apache.org/jira/browse/CXF-899 > Project: CXF > Issue Type: Improvement > Components: JAX-WS Runtime > Affects Versions: 2.0.1 > Environment: Platform independent. > Reporter: Zarar Siddiqi > Assignee: Daniel Kulp > Fix For: 2.0.2 > > Attachments: FalbackForMissingGetFaultInfo.patch > > > CXF has interpreted the spec as saying that the getFaultInfo() method MUST be specified on a class annotated with @WebFault. > On page 21 of the JAX-WS 2.0 Spec it says that the class annotated with @WebFault may have two constructors + the getFaultInfo() method. Since we're not enforcing the two constructors, why enforce the getFaultInfo()? There's absolutely no need to do this. The place where this is being enforced is the WebFaultOutInterceptor whose behavior should be changed to using the @WebFault class as the faultInfo bean if getFaultInfo() is not present. This is a good fallback method for cases where the user does not want the additional exception to part of the WSDL for whatever reason. In most cases, one exception is more than good enough to represent a fault. > This also helps those who are migrating from XFire as they can't afford to change the WSDL for existing users. I don't know how much emphasis the CXF team places on backwards compatibility but this alone is a very good reason to make this change. > The current behavior is that if the getFaultInfo() method is not specified then then the @WebFault annotated class' properties become part of the WSDL. The only thing stopping this from being functionally correct is the code in WebFaultOutInterceptor which requires a getFaultInfo() method. > I think this offers greater flexibility to users while still complying with the spec. This way those who'd like to specify getFaultInfo() can do so and those who don't want to, don't have to. I also brought this up on the commits mailing list: > http://www.nabble.com/forum/ViewPost.jtp?post=12055118&framed=y > I'm also uploading a patch for WebFaultOutInterceptor which has the fallback behavior of using the @WebFault bean as the faultInfo if getFaultInfo() is not present. > Thanks, > Zarar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.