cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r726992 - in /cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx: JMSTransactionClientServerTest.java jms_server_config.xml
Date Tue, 16 Dec 2008 08:50:29 GMT
Author: ningjiang
Date: Tue Dec 16 00:50:29 2008
New Revision: 726992

URL: http://svn.apache.org/viewvc?rev=726992&view=rev
Log:
CXF-180 Added an example to show how to ignore the UserCheckedException

Modified:
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java?rev=726992&r1=726991&r2=726992&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
(original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
Tue Dec 16 00:50:29 2008
@@ -28,6 +28,7 @@
 import org.apache.cxf.systest.jms.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.hello_world_doc_lit.Greeter;
+import org.apache.hello_world_doc_lit.PingMeFault;
 import org.apache.hello_world_doc_lit.SOAPService2;
 import org.junit.Before;
 import org.junit.Test;
@@ -91,6 +92,13 @@
             assertNotNull("No response received from service", greeting);
             exResponse = response1 + "[Bad guy]";
             assertEquals("Get unexcpeted result", exResponse, greeting);
+            
+            try {
+                greeter.pingMe();
+                fail("Should have thrown FaultException");
+            } catch (PingMeFault ex) {
+                assertNotNull(ex.getFaultInfo());
+            }  
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml?rev=726992&r1=726991&r2=726992&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml Tue
Dec 16 00:50:29 2008
@@ -67,7 +67,9 @@
   	<property name="target" ref="implementor" />
   	<property name="transactionAttributes">
   	  <props>
-  	  	<prop key="greetMe">PROPAGATION_REQUIRED</prop>  	  	
+  	  	<prop key="greetMe">PROPAGATION_REQUIRED</prop>
+  	  	<!-- Commit if pingMe throw PingMeFault -->
+  	  	<prop key="pingMe">PROPAGATION_REQUIRED,+PingMeFault</prop>  	  	
   	  </props>
     </property>
   </bean>  



Mime
View raw message