Return-Path: Delivered-To: apmail-ws-axis-cvs-archive@www.apache.org Received: (qmail 17387 invoked from network); 2 Mar 2006 05:01:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Mar 2006 05:01:39 -0000 Received: (qmail 7569 invoked by uid 500); 2 Mar 2006 05:02:23 -0000 Delivered-To: apmail-ws-axis-cvs-archive@ws.apache.org Received: (qmail 7504 invoked by uid 500); 2 Mar 2006 05:02:23 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 7492 invoked by uid 500); 2 Mar 2006 05:02:23 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 7489 invoked by uid 99); 2 Mar 2006 05:02:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2006 21:02:23 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 01 Mar 2006 21:02:22 -0800 Received: (qmail 17202 invoked by uid 65534); 2 Mar 2006 05:01:02 -0000 Message-ID: <20060302050102.17201.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r382297 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Date: Thu, 02 Mar 2006 05:01:01 -0000 To: axis2-cvs@ws.apache.org From: chinthaka@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: chinthaka Date: Wed Mar 1 21:01:00 2006 New Revision: 382297 URL: http://svn.apache.org/viewcvs?rev=382297&view=rev Log: Fixing hardcoded SOAP prefix in faults. Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=382297&r1=382296&r2=382297&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java (original) +++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Wed Mar 1 21:01:00 2006 @@ -34,6 +34,7 @@ import org.apache.ws.commons.om.OMElement; import org.apache.ws.commons.soap.SOAP11Constants; import org.apache.ws.commons.soap.SOAP12Constants; +import org.apache.ws.commons.soap.SOAPConstants; import org.apache.ws.commons.soap.SOAPEnvelope; import org.apache.ws.commons.soap.SOAPFault; import org.apache.ws.commons.soap.SOAPFaultCode; @@ -94,19 +95,24 @@ String role = hb.getRole(); + String prefix = se.getNamespace().getPrefix(); + if (!msgContext.isSOAP11()) { // if must understand and soap 1.2 the Role should be NEXT , if it is null we considerr // it to be NEXT + if (prefix == null || "".equals(prefix)) { + prefix = SOAPConstants.SOAPFAULT_NAMESPACE_PREFIX; + } if (role != null) { if (!SOAP12Constants.SOAP_ROLE_NEXT.equals(role)) { throw new AxisFault("Must Understand check failed", - SOAP12Constants.FAULT_CODE_MUST_UNDERSTAND); + prefix + ":" + SOAP12Constants.FAULT_CODE_MUST_UNDERSTAND); } } else { // This is the ultimate receiver, throw an error. throw new AxisFault("Must Understand check failed", - SOAP12Constants.FAULT_CODE_MUST_UNDERSTAND); + prefix + ":" + SOAP12Constants.FAULT_CODE_MUST_UNDERSTAND); } } else { @@ -114,7 +120,7 @@ // it to be NEXT if ((role != null) && !SOAP11Constants.SOAP_ACTOR_NEXT.equals(role)) { throw new AxisFault("Must Understand check failed", - SOAP11Constants.FAULT_CODE_MUST_UNDERSTAND); + prefix + ":" + SOAP11Constants.FAULT_CODE_MUST_UNDERSTAND); } } }