You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2008/12/17 13:52:26 UTC

svn commit: r727363 - in /servicemix/components/engines/servicemix-cxf-se/trunk/src: main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java

Author: ffang
Date: Wed Dec 17 04:52:25 2008
New Revision: 727363

URL: http://svn.apache.org/viewvc?rev=727363&view=rev
Log:
[SM-1739]Add testContextInjectionRobustInOnly() test to CxfSeContextInjectionTest.java to verify robust-in-only mep is handled correctly

Modified:
    servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java
    servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java

Modified: servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java?rev=727363&r1=727362&r2=727363&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java (original)
+++ servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java Wed Dec 17 04:52:25 2008
@@ -30,6 +30,7 @@
 import javax.jbi.messaging.ExchangeStatus;
 import javax.jbi.messaging.InOnly;
 import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.RobustInOnly;
 import javax.wsdl.WSDLException;
 import javax.wsdl.factory.WSDLFactory;
 import javax.xml.namespace.QName;
@@ -359,7 +360,7 @@
 			if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
 				jbiDestination.getJBIDispatcherUtil().dispatch(exchange);
 			}
-                        if (exchange instanceof InOnly) {
+                        if (exchange instanceof InOnly || exchange instanceof RobustInOnly) {
                             exchange.setStatus(ExchangeStatus.DONE);
                             dc.send(exchange);
                         }

Modified: servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java?rev=727363&r1=727362&r2=727363&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java (original)
+++ servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java Wed Dec 17 04:52:25 2008
@@ -65,7 +65,7 @@
         
     }
     
-    public void testContextInjectionOneway() throws Exception {
+    public void testContextInjectionInOnly() throws Exception {
         LOG.info("test Injection");
         client = new DefaultServiceMixClient(jbi);
         io = client.createInOnlyExchange();
@@ -84,6 +84,24 @@
         assertNull(io.getMessage("out"));
         
     }
+    
+    public void testContextInjectionRobustInOnly() throws Exception {
+        client = new DefaultServiceMixClient(jbi);
+        io = client.createRobustInOnlyExchange();
+        io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPService"));
+        io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter"));
+        io.setOperation(new QName("http://apache.org/hello_world_soap_http", "greetMeOneWay"));
+        io.getMessage("in").setContent(new StringSource(
+                "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
+              + "<part> "
+              + "<greetMeOneWay xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
+              + "ffang"
+              + "</requestType></greetMeOneWay>"
+              + "</part> "
+              + "</message>"));
+        client.sendSync(io);
+        assertNull(io.getMessage("out"));
+    }
 
     @Override
     protected AbstractXmlApplicationContext createBeanFactory() {