cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r479927 - in /incubator/cxf/trunk: rt/core/src/main/java/org/apache/cxf/endpoint/ rt/core/src/main/java/org/apache/cxf/interceptor/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ systests/src/test/java/org/apache/cxf/systest/schema_v...
Date Tue, 28 Nov 2006 06:29:00 GMT
Author: mmao
Date: Mon Nov 27 22:29:00 2006
New Revision: 479927

URL: http://svn.apache.org/viewvc?view=rev&rev=479927
Log:
Fixed schema validation system test 
* add fault observer in the server outbound process
* add fault observer in the client inbound process
So if something wrong in the outbound processing in the server side, we are able to catch
the fault, and go through the fault chain
and if something wrong in the inbound processing in the client side , we are able to catch
the fault, and go through the fault chain
The validation system test cover the server side and client side fault processing.

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainIntiatorObserver.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainSetupInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?view=diff&rev=479927&r1=479926&r2=479927
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Mon
Nov 27 22:29:00 2006
@@ -241,6 +241,7 @@
             LOG.fine("Interceptors contributed by binding: " + il);
         }
         chain.add(il);
+        chain.setFaultObserver(outFaultObserver);
         
         // execute chain
         try {

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainIntiatorObserver.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainIntiatorObserver.java?view=diff&rev=479927&r1=479926&r2=479927
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainIntiatorObserver.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractFaultChainIntiatorObserver.java
Mon Nov 27 22:29:00 2006
@@ -52,20 +52,9 @@
         
         faultMessage = m.getExchange().get(Binding.class).createMessage(faultMessage);
         setFaultMessage(m, faultMessage);
-        //m.putAll(faultMessage);
-        //faultMessage.putAll(m);
 
         MessageImpl.copyContent(m, faultMessage);
-        
-//        Exception e = m.getContent(Exception.class);
-//        Fault f;
-//        if (e instanceof Fault) {
-//            f = (Fault) e;
-//        } else {
-//            f = new Fault(e);
-//        }
-//        faultMessage.setContent(Exception.class, f);
-        
+               
         // setup chain
         PhaseInterceptorChain chain = new PhaseInterceptorChain(getPhases());
         initializeInterceptors(faultMessage.getExchange(), chain);

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainSetupInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainSetupInterceptor.java?view=diff&rev=479927&r1=479926&r2=479927
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainSetupInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainSetupInterceptor.java
Mon Nov 27 22:29:00 2006
@@ -121,7 +121,7 @@
             }
             chain.add(il);
         }
-        
+        chain.setFaultObserver(ep.getOutFaultObserver());
         return chain;
     }
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?view=diff&rev=479927&r1=479926&r2=479927
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
Mon Nov 27 22:29:00 2006
@@ -101,7 +101,6 @@
         configureObject(service);
         
         service.put(Message.SCHEMA_VALIDATION_ENABLED, service.getEnableSchemaValidationForAllPort());
-        
         if (implInfo.isWebServiceProvider()) {
             service.setInvoker(new ProviderInvoker((Provider<?>)i));
         } else {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java?view=diff&rev=479927&r1=479926&r2=479927
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
Mon Nov 27 22:29:00 2006
@@ -111,7 +111,7 @@
             // exception while unmarshalling the invalid response.
             /*complexStruct =*/
             validation.getComplexStruct("Hello");
-            //fail("Get ComplexStruct should have thrown ProtocolException");
+            fail("Get ComplexStruct should have thrown ProtocolException");
         } catch (Exception e) {
             assertTrue(e instanceof Fault);
             String expected = "'{\"http://apache.org/schema_validation/types\":elem2}' is
expected.";
@@ -124,10 +124,10 @@
             // exception while unmarshalling the invalid response.
             /*occuringStruct =*/
             validation.getOccuringStruct("World");
-            //fail("Get OccuringStruct should have thrown ProtocolException");
+            fail("Get OccuringStruct should have thrown ProtocolException");
         } catch (Exception e) {
             assertTrue(e instanceof Fault);
-            String expected = "'{\"http://apache.org/schema_validation/types\":elem2}' is
expected.";
+            String expected = "'{\"http://apache.org/schema_validation/types\":varFloat}'
is expected.";
             assertTrue(e.getMessage().indexOf(expected) != -1);
         }
     }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml?view=diff&rev=479927&r1=479926&r2=479927
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
Mon Nov 27 22:29:00 2006
@@ -24,7 +24,7 @@
 
     <bean id="{http://apache.org/schema_validation}SchemaValidationService" abstract="true">
 	<property name="enableSchemaValidationForAllPort">
-	    <value>true</value>
+	    <value>false</value>
 	</property>
     </bean>
 



Mime
View raw message