synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r355793 - in /incubator/synapse/trunk/java: maven.xml test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java
Date Sat, 10 Dec 2005 23:04:15 GMT
Author: saminda
Date: Sat Dec 10 15:04:12 2005
New Revision: 355793

URL: http://svn.apache.org/viewcvs?rev=355793&view=rev
Log:
We have a test case for SendOn.

Modified:
    incubator/synapse/trunk/java/maven.xml
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java

Modified: incubator/synapse/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/maven.xml?rev=355793&r1=355792&r2=355793&view=diff
==============================================================================
--- incubator/synapse/trunk/java/maven.xml (original)
+++ incubator/synapse/trunk/java/maven.xml Sat Dec 10 15:04:12 2005
@@ -114,8 +114,8 @@
             <echo message="-----------Creating Testing Repository - SendOnAxis2 ----------"/>
             <mkdir dir="target/synapse-repository-sendonAxis2"/>
 
-            <!--<copy file="target/npe.aar"-->
-                  <!--tofile="target/synapse-repository-sendonAxis2/services/npe.aar"/>-->
+            <copy file="target/npe.aar"
+                  tofile="target/synapse-repository-sendonAxis2/services/npe.aar"/>
             <copy file="target/test-mediator.aar"
                   tofile="target/synapse-repository-sendonAxis2/services/test-mediator.aar"/>
 

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=355793&r1=355792&r2=355793&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
Sat Dec 10 15:04:12 2005
@@ -4,6 +4,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.MessageSender;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 import org.apache.synapse.util.Axis2EvnSetup;
 
@@ -26,9 +27,7 @@
 */
 
 public class SendOnProcessorWithRuleTest extends TestCase {
-    // todo: i have  to comment out this test case
-    // todo: because SimpleHTTPServer does not allow
-    // todo: to initiate multiple objects. :(
+    
     private SimpleHTTPServer synapseServer;
     private SimpleHTTPServer axis2Server;
     private EndpointReference targetEpr = new EndpointReference(
@@ -36,27 +35,28 @@
     private QName operation = new QName("anonymous");
 
     public void setUp() throws Exception {
-//        synapseServer = new SimpleHTTPServer("target/synapse-repository-sendon",
-//                5043);
-//        /**
-//         * axis2Server is the one who holds the actual service
-//         */
-//        axis2Server = new SimpleHTTPServer("synapse-repository-sendonAxis2",
-//                8090);
-//        synapseServer.start();
-//        axis2Server.start();
+        synapseServer = new SimpleHTTPServer("target/synapse-repository-sendon",
+                5043);
+        /**
+         * axis2Server is the one who holds the actual service
+         */
+        axis2Server = new SimpleHTTPServer("synapse-repository-sendonAxis2",
+                8090);
+        synapseServer.start();
+        axis2Server.start();
     }
 
     protected void tearDown() throws Exception {
-//        synapseServer.stop();
-//        axis2Server.stop();
+        synapseServer.stop();
+        axis2Server.stop();
     }
 
     public void testSendPrcessor() throws Exception {
-//        MessageSender msgSender = new MessageSender();
-//        msgSender.setTo(targetEpr);
-//        msgSender.setSenderTransport(Constants.TRANSPORT_HTTP);
-//        msgSender.send(operation.getLocalPart(), Axis2EvnSetup.payload());
+        MessageSender msgSender = new MessageSender();
+        Options options = new Options();
+        options.setTo(targetEpr);
+        msgSender.setClientOptions(options);
+        msgSender.send(operation.getLocalPart(), Axis2EvnSetup.payload());
 
     }
 



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


Mime
View raw message