axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r573373 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
Date Thu, 06 Sep 2007 20:54:15 GMT
Author: scheu
Date: Thu Sep  6 13:54:14 2007
New Revision: 573373

URL: http://svn.apache.org/viewvc?rev=573373&view=rev
Log:
AXIS2-3179
Contributor: Bill Nagy
Correct the prefix and uri processing in MessageContextBuilder to avoid duplicate namespaces.

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java?rev=573373&r1=573372&r2=573373&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
Thu Sep  6 13:54:14 2007
@@ -37,14 +37,13 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingConstants;
-import org.apache.axis2.addressing.AddressingConstants.Final;
 import org.apache.axis2.addressing.AddressingHelper;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.RelatesTo;
+import org.apache.axis2.addressing.AddressingConstants.Final;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.Parameter;
@@ -58,6 +57,7 @@
 import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
+
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Iterator;
@@ -472,12 +472,14 @@
                     if (faultCodeQName.getLocalPart().indexOf(":") == -1) {
                         String prefix = faultCodeQName.getPrefix();
                         String uri = faultCodeQName.getNamespaceURI();
-                        prefix = prefix == null || "".equals(prefix) ?
-                                fault.getNamespace().getPrefix() : prefix;
+                        // Get the specified prefix and uri
+                        prefix = prefix == null ? "" : prefix;
                         uri = uri == null || "" .equals(uri) ?
                                 fault.getNamespace().getNamespaceURI() : uri;
+                        // Make sure the prefix and uri are declared on the fault, and 
+                        // get the resulting prefix.
+                        prefix = fault.declareNamespace(uri, prefix).getPrefix();
                         soapFaultCode = prefix + ":" + faultCodeQName.getLocalPart();
-                        fault.declareNamespace(uri, prefix);
                     } else {
                         soapFaultCode = faultCodeQName.getLocalPart();
                     }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message