axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r382300 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: addressing/AddressingConstants.java engine/AxisEngine.java
Date Thu, 02 Mar 2006 05:10:43 GMT
Author: chinthaka
Date: Wed Mar  1 21:10:40 2006
New Revision: 382300

URL: http://svn.apache.org/viewcvs?rev=382300&view=rev
Log:
Fixing possible NPE
Adding WSA Fault action

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/addressing/AddressingConstants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/addressing/AddressingConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/addressing/AddressingConstants.java?rev=382300&r1=382299&r2=382300&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/addressing/AddressingConstants.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/addressing/AddressingConstants.java
Wed Mar  1 21:10:40 2006
@@ -56,6 +56,7 @@
                 "http://www.w3.org/2005/08/addressing/anonymous";
         public static final String WSA_NONE_URI =
                 "http://www.w3.org/2005/08/addressing/none";
+        public static final String WSA_FAULT_ACTION = "http://www.w3.org/2005/08/addressing/fault";
         public static final String WSA_TYPE_ATTRIBUTE_VALUE = "true";
         public static final String WSA_SERVICE_NAME_ENDPOINT_NAME = "EndpointName";
         public static final String WSA_POLICIES = "Policies";

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=382300&r1=382299&r2=382300&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:10:40 2006
@@ -96,7 +96,7 @@
             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
@@ -276,14 +276,18 @@
             fault.setCode((SOAPFaultCode) faultCode);
         } else if (soapException != null) {
             soapFaultCode = soapException.getFaultCode();
-        } else if ((exception = e) instanceof AxisFault || (exception = e.getCause()) instanceof
AxisFault) {
+        } else
+        if (e != null && ((exception = e) instanceof AxisFault || (exception = e.getCause())
instanceof AxisFault))
+        {
             QName faultCodeQName = ((AxisFault) exception).getFaultCode();
-            String prefix = faultCodeQName.getPrefix();
-            String uri = faultCodeQName.getNamespaceURI();
-            prefix = prefix == null || "".equals(prefix) ? Constants.AXIS2_NAMESPACE_PREFIX
: prefix;
-            uri = uri == null || "".equals(uri) ? Constants.AXIS2_NAMESPACE_URI : uri;
-            soapFaultCode = prefix + ":" + faultCodeQName.getLocalPart();
-            fault.declareNamespace(uri, prefix);
+            if (faultCodeQName != null) {
+                String prefix = faultCodeQName.getPrefix();
+                String uri = faultCodeQName.getNamespaceURI();
+                prefix = prefix == null || "".equals(prefix) ? Constants.AXIS2_NAMESPACE_PREFIX
: prefix;
+                uri = uri == null || "".equals(uri) ? Constants.AXIS2_NAMESPACE_URI : uri;
+                soapFaultCode = prefix + ":" + faultCodeQName.getLocalPart();
+                fault.declareNamespace(uri, prefix);
+            }
         }
 
         // defaulting to fault code Sender, if no message is available



Mime
View raw message