You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2007/06/07 05:24:09 UTC

svn commit: r545040 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java

Author: gdaniels
Date: Wed Jun  6 20:24:09 2007
New Revision: 545040

URL: http://svn.apache.org/viewvc?view=rev&rev=545040
Log:
Don't need to check namespaces when there's a generic API.  Also, always clear out subcode array when setting values.

Fix for AXIS2-2753.

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

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java?view=diff&rev=545040&r1=545039&r2=545040
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java Wed Jun  6 20:24:09 2007
@@ -18,7 +18,6 @@
 package org.apache.axis2;
 
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultCode;
 import org.apache.axiom.soap.SOAPFaultDetail;
@@ -202,16 +201,12 @@
         }
 
         if (soapFaultCode != null) {
-            if(soapFaultReason.getNamespace() != null && 
-                    soapFaultReason.getNamespace().getNamespaceURI().equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
-                faultCode = soapFaultCode.getValue().getTextAsQName();
-            } else {
-                faultCode = soapFaultCode.getTextAsQName();
-            }
+            // This works the same regardless of SOAP version
+            faultCode = soapFaultCode.getTextAsQName();
 
             SOAPFaultSubCode subCode = soapFaultCode.getSubCode();
             if (subCode != null) {
-                if (faultSubCodes == null) faultSubCodes = new ArrayList();
+                faultSubCodes = new ArrayList();
                 while (subCode != null) {
                     faultSubCodes.add(subCode.getValue().getTextAsQName());
                     subCode = subCode.getSubCode();



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