Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 19313 invoked from network); 5 Dec 2007 17:03:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2007 17:03:08 -0000 Received: (qmail 55124 invoked by uid 500); 5 Dec 2007 17:02:56 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 55111 invoked by uid 500); 5 Dec 2007 17:02:56 -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 55102 invoked by uid 99); 5 Dec 2007 17:02:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2007 09:02:56 -0800 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, 05 Dec 2007 17:03:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 356067141FE for ; Wed, 5 Dec 2007 09:02:43 -0800 (PST) Message-ID: <17511428.1196874163216.JavaMail.jira@brutus> Date: Wed, 5 Dec 2007 09:02:43 -0800 (PST) From: "Daniel Kulp (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Commented: (CXF-1003) WebFaultOutInterceptor.getFaultMessagePart() might be too draconian and it also has private visibility In-Reply-To: <4774647.1189719392306.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-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548730 ] Daniel Kulp commented on CXF-1003: ---------------------------------- Much of this SHOULD be fixed for 2.0.3 and I think a little more for 2.0.4 SNAPSHOT. > WebFaultOutInterceptor.getFaultMessagePart() might be too draconian and it also has private visibility > ------------------------------------------------------------------------------------------------------ > > Key: CXF-1003 > URL: https://issues.apache.org/jira/browse/CXF-1003 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Affects Versions: 2.0.1 > Environment: Platform independent. > Reporter: Zarar Siddiqi > Assignee: Daniel Kulp > Attachments: BetterCheckForAFaultMessagePartInfo.patch > > > This implementation of this method is a little draconian (at least to me). It forces a match on the localPart and the namespace of MessagePartInfo and the fault QName before returning the MessagePartInfo. In the case of where the exception class annotated with @WebFault (default namespace so it "inherits" the services) is also the fault bean (i.e.: no getFaultInfo method specified) the name of the namespace URI will never match because only mpi's that are NOT elements are going to be considered. And since the fault class is a java class, it's corresponding MPI's getTypeQName() will always return the namespace corresponding to the package name and NOT the real namespace of the exception (which really lies behind getElementQName()). > I propose changing this method so that if no MessagePartInfo is found using the current method, we loosen the criteria and return a match based on the elementQName. This will also require modification of the MessagePartInfo class. > Now the alternate is to make this method public or protected so it can be overridden. But that's not really a solution. > I'm working on a patch but before I upload it I was wondering what the CXF team thought of this > Thanks, > Zarar > Here's the method up for review: > private MessagePartInfo getFaultMessagePart(QName qname, OperationInfo op) { > for (FaultInfo faultInfo : op.getFaults()) { > for (MessagePartInfo mpi : faultInfo.getMessageParts()) { > String ns = null; > if (mpi.isElement()) { > ns = mpi.getElementQName().getNamespaceURI(); > } else { > ns = mpi.getTypeQName().getNamespaceURI(); > } > if (qname.getLocalPart().equals(mpi.getConcreteName().getLocalPart()) > && qname.getNamespaceURI().equals(ns)) { > return mpi; > } > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.