cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r599337 - in /incubator/cxf/trunk: rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ systests/src/test/java/org/apache/cxf/systest/interceptor/
Date Thu, 29 Nov 2007 08:42:40 GMT
Author: mmao
Date: Thu Nov 29 00:42:32 2007
New Revision: 599337

URL: http://svn.apache.org/viewvc?rev=599337&view=rev
Log:
CXF-1191
 * Fix the NEP, enable the tests disabled in the last commit


Modified:
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java?rev=599337&r1=599336&r2=599337&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
Thu Nov 29 00:42:32 2007
@@ -152,8 +152,10 @@
     * @return true iff the current messaging role is that of requestor
     */
     public static boolean isRequestor(Message message) {
-        Boolean requestor = (Boolean)message.get(REQUESTOR_ROLE);
-        return requestor != null && requestor.booleanValue();
+        if (message.get(REQUESTOR_ROLE) instanceof Boolean) {
+            return ((Boolean)message.get(REQUESTOR_ROLE)).booleanValue();
+        }
+        return false;
     }
 
     /**

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?rev=599337&r1=599336&r2=599337&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
Thu Nov 29 00:42:32 2007
@@ -420,6 +420,9 @@
     }
 
     private boolean isSameFault(final FaultInfo faultInfo, String faultName) {
+        if (faultInfo.getName() == null || faultName == null) {
+            return false;
+        }
         String faultInfoName = faultInfo.getName().getLocalPart();
         return faultInfoName.equals(faultName) 
             || faultInfoName.equals(StringUtils.uncapitalize(faultName));

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java?rev=599337&r1=599336&r2=599337&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
Thu Nov 29 00:42:32 2007
@@ -281,12 +281,8 @@
         } catch (WebServiceException ex) {
             Throwable cause = ex.getCause();
             SoapFault sf = (SoapFault)cause;
-            if (!expectedMsg.equals(sf.getReason())) {
-                // TODO, the FromJava WS-A action is not supported yet
-            } else {
-                assertEquals(expectedMsg, sf.getReason());
-                assertEquals(SOAP_FAULT_CODE, sf.getFaultCode());
-            }            
+            assertEquals(expectedMsg, sf.getReason());
+            assertEquals(SOAP_FAULT_CODE, sf.getFaultCode());
         }  
     }
    



Mime
View raw message