You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by sa...@apache.org on 2006/01/02 12:45:00 UTC

svn commit: r365335 - in /incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection: FaultProcessorWithRuleTest.java SendBackProcessorWithRuleTest.java SendOnProcessorWithAddressingEngageWithRuleTest.java SendOnProcessorWithRuleTest.java

Author: saminda
Date: Mon Jan  2 03:44:50 2006
New Revision: 365335

URL: http://svn.apache.org/viewcvs?rev=365335&view=rev
Log:
Change the test cases to cope with current client side changes happen in 
Axis2 

Modified:
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendBackProcessorWithRuleTest.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithAddressingEngageWithRuleTest.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java?rev=365335&r1=365334&r2=365335&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java Mon Jan  2 03:44:50 2006
@@ -19,13 +19,12 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.client.MessageSender;
 import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
 
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 import org.apache.synapse.util.Axis2EvnSetup;
 
-import javax.xml.namespace.QName;
 
 public class FaultProcessorWithRuleTest extends TestCase {
     /**
@@ -36,7 +35,6 @@
     private SimpleHTTPServer synapseServer;
     private EndpointReference targetEpr = new EndpointReference(
             "http://127.0.0.1:5043/axis2/services/anonymous");
-    private QName operation = new QName("anonymous");
 
     public void setUp() throws Exception {
         synapseServer = new SimpleHTTPServer("target/synapse-repository-fault", 5043);
@@ -48,12 +46,11 @@
     }
 
     public void testFaultPrcessor() throws Exception {
-        MessageSender msgSender = new MessageSender();
+        ServiceClient serviceClient = new ServiceClient();
         Options co = new Options();
         co.setTo(targetEpr);        
-        msgSender.setClientOptions(co);
-        msgSender.send(operation.getLocalPart(),Axis2EvnSetup.payload());
-
+        serviceClient.setOptions(co);
+        serviceClient.fireAndForget(Axis2EvnSetup.payload());
     }
 
 }

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendBackProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendBackProcessorWithRuleTest.java?rev=365335&r1=365334&r2=365335&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendBackProcessorWithRuleTest.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendBackProcessorWithRuleTest.java Mon Jan  2 03:44:50 2006
@@ -19,18 +19,16 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.client.MessageSender;
 import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 import org.apache.synapse.util.Axis2EvnSetup;
 
-import javax.xml.namespace.QName;
 
 public class SendBackProcessorWithRuleTest extends TestCase {
     private SimpleHTTPServer synapseServer;
     private EndpointReference targetEpr = new EndpointReference(
             "http://127.0.0.1:5043/axis2/services/anonymous");
-    private QName operation = new QName("anonymous");
 
     public void setUp() throws Exception {
         synapseServer = new SimpleHTTPServer("target/synapse-repository-send",
@@ -43,11 +41,11 @@
     }
 
     public void testSendPrcessor() throws Exception {
-        MessageSender msgSender = new MessageSender();
+        ServiceClient serviceClient = new ServiceClient();
         Options co = new Options();
         co.setTo(targetEpr);        
-        msgSender.setClientOptions(co);
-        msgSender.send(operation.getLocalPart(), Axis2EvnSetup.payload());
+        serviceClient.setOptions(co);
+        serviceClient.fireAndForget(Axis2EvnSetup.payload());
 
     }
 

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithAddressingEngageWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithAddressingEngageWithRuleTest.java?rev=365335&r1=365334&r2=365335&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithAddressingEngageWithRuleTest.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithAddressingEngageWithRuleTest.java Mon Jan  2 03:44:50 2006
@@ -2,12 +2,11 @@
 
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.client.Call;
 import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.om.OMElement;
 import org.apache.synapse.util.Axis2EvnSetup;
 
-import javax.xml.namespace.QName;
 
 import junit.framework.TestCase;
 /*
@@ -32,7 +31,6 @@
     private SimpleHTTPServer axis2Server;
     private EndpointReference targetEpr = new EndpointReference(
             "http://127.0.0.1:5043/axis2/services/anonymous");
-    private QName operation = new QName("anonymous");
 
     public void setUp() throws Exception {
         synapseServer = new SimpleHTTPServer("target/synapse-repository-sendon",
@@ -53,12 +51,11 @@
     }
 
     public void testSendProcessor() throws Exception {
-        Call call = new Call();
+        ServiceClient serviceClient = new ServiceClient();
         Options options = new Options();
         options.setTo(targetEpr);
-        call.setClientOptions(options);
-        OMElement response = call.invokeBlocking(operation.getLocalPart(),
-                Axis2EvnSetup.payloadNamedAdddressing());
+        serviceClient.setOptions(options);
+        OMElement response = serviceClient.sendReceive(Axis2EvnSetup.payloadNamedAdddressing());
         assertEquals("Synapse Testing String_Response_With_Addressing",
                 response.getText());
 

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java?rev=365335&r1=365334&r2=365335&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java Mon Jan  2 03:44:50 2006
@@ -18,15 +18,12 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.client.MessageSender;
 import org.apache.axis2.client.Options;
-import org.apache.axis2.client.Call;
+import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 import org.apache.axis2.om.OMElement;
 import org.apache.synapse.util.Axis2EvnSetup;
 
-import javax.xml.namespace.QName;
-
 
 public class SendOnProcessorWithRuleTest extends TestCase {
 
@@ -34,7 +31,6 @@
     private SimpleHTTPServer axis2Server;
     private EndpointReference targetEpr = new EndpointReference(
             "http://127.0.0.1:5043/axis2/services/anonymous");
-    private QName operation = new QName("anonymous");
 
     public void setUp() throws Exception {
         synapseServer = new SimpleHTTPServer("target/synapse-repository-sendon",
@@ -54,11 +50,11 @@
     }
 
     public void testSendProcessor() throws Exception {
-        Call call = new Call();
+        ServiceClient serviceClient = new ServiceClient();
         Options options = new Options();
         options.setTo(targetEpr);
-        call.setClientOptions(options);
-        OMElement response = call.invokeBlocking(operation.getLocalPart(), Axis2EvnSetup.payload());
+        serviceClient.setOptions(options);
+        OMElement response = serviceClient.sendReceive(Axis2EvnSetup.payload());
         assertEquals("Synapse Testing String_Response",response.getText());
 
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org