You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by gd...@apache.org on 2007/05/08 14:48:51 UTC

svn commit: r536181 - /webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java

Author: gdaniels
Date: Tue May  8 05:48:50 2007
New Revision: 536181

URL: http://svn.apache.org/viewvc?view=rev&rev=536181
Log:
Fix test.  The AxisService wasn't being associated with the correct AxisConfiguration, so the deployer wasn't finding the right phase.

Modified:
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java?view=diff&rev=536181&r1=536180&r2=536181
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java Tue May  8 05:48:50 2007
@@ -30,6 +30,7 @@
 import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.util.Utils;
+import org.apache.axis2.AbstractTestCase;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -38,6 +39,7 @@
 import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.Reader;
+import java.io.FileInputStream;
 import java.net.Socket;
 
 public class MessageWithServerTest extends UtilServerBasedTestCase {
@@ -59,16 +61,19 @@
 
 
     protected void setUp() throws Exception {
+        AxisConfiguration config = new AxisConfiguration();
+
         AxisService service = Utils.createSimpleService(serviceName,
                                                         Echo.class.getName(),
                                                         operationName);
+        config.addService(service);
 
         //service.setFaultInFlow(new MockFlow("service faultflow", 1));
 
         AxisModule m1 = new AxisModule("A Module 1");
         m1.setInFlow(new MockFlow("service module inflow", 4));
+
         //m1.setFaultInFlow(new MockFlow("service module faultflow", 1));
-        AxisConfiguration config = new AxisConfiguration();
         config.addMessageReceiver(
                 "http://www.w3.org/2004/08/wsdl/in-only", new RawXMLINOnlyMessageReceiver());
         config.addMessageReceiver(
@@ -105,8 +110,7 @@
         config.getGlobalInFlow().add(dispatchPhase);
         service.engageModule(m1);
 
-        AxisOperation axisOperation = new OutInAxisOperation(
-        );
+        AxisOperation axisOperation = new OutInAxisOperation();
         axisOperation.setName(operationName);
         service.addOperation(axisOperation);
 
@@ -119,6 +123,10 @@
 
     public void testEchoStringServer() throws Exception {
         InputStream in = cl.getResourceAsStream("soap/soapmessage.txt");
+
+        if (in == null) {
+            in = new FileInputStream(AbstractTestCase.basedir + "/test-resources/soap/soapmessage.txt");
+        }
 
         Socket socket = new Socket("127.0.0.1", UtilServer.TESTING_PORT);
         OutputStream out = socket.getOutputStream();



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