You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2005/05/16 08:22:53 UTC

svn commit: r170319 - in /webservices/axis/trunk/java/modules: addressing/test/org/apache/axis/handlers/addressing/ core/src/org/apache/axis/context/ core/src/org/apache/axis/phaseresolver/ core/src/org/apache/axis/util/ samples/ samples/test/org/apache/axis/clientapi/ samples/test/org/apache/axis/engine/ samples/test/org/apache/axis/integration/

Author: hemapani
Date: Sun May 15 23:22:51 2005
New Revision: 170319

URL: http://svn.apache.org/viewcvs?rev=170319&view=rev
Log:
updating testcases

Modified:
    webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingInHandlerTest.java
    webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseException.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java
    webservices/axis/trunk/java/modules/samples/maven.xml
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceive.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceiveAsync.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java

Modified: webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingInHandlerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingInHandlerTest.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingInHandlerTest.java (original)
+++ webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingInHandlerTest.java Sun May 15 23:22:51 2005
@@ -2,7 +2,6 @@
 
 import junit.framework.TestCase;
 
-import org.apache.axis.AbstractTestCase;
 import org.apache.axis.addressing.AddressingConstants;
 import org.apache.axis.addressing.EndpointReference;
 import org.apache.axis.addressing.MessageInformationHeadersCollection;

Modified: webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java (original)
+++ webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java Sun May 15 23:22:51 2005
@@ -1,6 +1,9 @@
 package org.apache.axis.handlers.addressing;
 
-import org.apache.axis.AbstractTestCase;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
 import org.apache.axis.addressing.AddressingConstants;
 import org.apache.axis.addressing.AnyContentType;
 import org.apache.axis.addressing.EndpointReference;
@@ -14,8 +17,6 @@
 import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
 import org.apache.wsdl.WSDLConstants;
 
-import javax.xml.namespace.QName;
-
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -32,7 +33,7 @@
  * the License.
  * <p/>
  */
-public class AddressingOutHandlerTest extends AbstractTestCase implements AddressingConstants {
+public class AddressingOutHandlerTest extends TestCase implements AddressingConstants {
     /**
      * Eran Chinthaka (chinthaka@apache.org)
      */

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java Sun May 15 23:22:51 2005
@@ -37,8 +37,6 @@
             initModules(engineContext);
         } catch (AxisFault axisFault) {
             throw new DeploymentException(axisFault.getMessage());
-        } catch (PhaseException e) {
-            throw new DeploymentException(e.getMessage());
         }
         return engineContext;
     }
@@ -54,8 +52,6 @@
             initModules(engineContext);
         } catch (AxisFault axisFault) {
             throw new DeploymentException(axisFault.getMessage());
-        } catch (PhaseException e) {
-            throw new DeploymentException(e.getMessage());
         }
         return engineContext;
     }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseException.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseException.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseException.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseException.java Sun May 15 23:22:51 2005
@@ -15,15 +15,16 @@
  */
 package org.apache.axis.phaseresolver;
 
+import org.apache.axis.engine.AxisFault;
+
 /**
  * Class PhaseException
  */
-public class PhaseException extends Exception {
+public class PhaseException extends AxisFault {
     /**
      * Constructor PhaseException
      */
-    public PhaseException() {
-    }
+ 
 
     /**
      * Constructor PhaseException

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java Sun May 15 23:22:51 2005
@@ -15,16 +15,22 @@
  */
 package org.apache.axis.util;
 
-import org.apache.axis.Constants;
-import org.apache.axis.context.ConfigurationContext;
-import org.apache.axis.context.ServiceContext;
-import org.apache.axis.description.*;
-import org.apache.axis.engine.*;
+import javax.xml.namespace.QName;
+
+import org.apache.axis.description.Flow;
+import org.apache.axis.description.HandlerDescription;
+import org.apache.axis.description.OperationDescription;
+import org.apache.axis.description.ParameterImpl;
+import org.apache.axis.description.ServiceDescription;
+import org.apache.axis.engine.AxisConfiguration;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.MessageReceiver;
+import org.apache.axis.phaseresolver.PhaseException;
+import org.apache.axis.phaseresolver.PhaseResolver;
 import org.apache.axis.receivers.AbstractMessageReceiver;
 import org.apache.axis.receivers.RawXMLINOutMessageRecevier;
 
-import javax.xml.namespace.QName;
-
 public class Utils {
 
     public static void addHandler(Flow flow, Handler handler) {
@@ -32,39 +38,37 @@
         hmd.setHandler(handler);
         flow.addHandler(hmd);
     }
-    public static void addPhasesToServiceFromFlow(
-        ServiceContext serviceContext,
-        String phaseName,
-        Flow flow,
-        int flowtype)
-        throws AxisFault {
-        // TODO : Fix me Deepal
-        throw new UnsupportedOperationException();
-        //        ArrayList faultchain = new ArrayList();
-        //        SimplePhase p = new SimplePhase(Constants.PHASE_SERVICE);
-        //        faultchain.add(p);
-        //        addHandlers(flow, p);
-        //        serviceContext.setPhases(faultchain, flowtype);
-    }
-
-    public static void createExecutionChains(ServiceContext serviceContext) throws AxisFault {
-        ServiceDescription service = serviceContext.getServiceConfig();
-        addPhasesToServiceFromFlow(
-            serviceContext,
-            Constants.PHASE_SERVICE,
-            service.getInFlow(),
-            AxisConfiguration.INFLOW);
-        addPhasesToServiceFromFlow(
-            serviceContext,
-            Constants.PHASE_SERVICE,
-            service.getOutFlow(),
-            AxisConfiguration.OUTFLOW);
-        addPhasesToServiceFromFlow(
-            serviceContext,
-            Constants.PHASE_SERVICE,
-            service.getFaultInFlow(),
-            AxisConfiguration.FAULT_IN_FLOW);
-    }
+//    public static void addPhasesToServiceFromFlow(
+//        ServiceContext serviceContext,
+//        String phaseName,
+//        Flow flow,
+//        int flowtype)
+//        throws AxisFault {
+//                ArrayList faultchain = new ArrayList();
+//                Phase p = new Phase(Constants.PHASE_SERVICE);
+//                faultchain.add(p);
+//                addHandlers(flow, p);
+//                serviceContext.setPhases(faultchain, flowtype);
+//    }
+
+//    public static void createExecutionChains(ServiceContext serviceContext) throws AxisFault {
+//        ServiceDescription service = serviceContext.getServiceConfig();
+//        addPhasesToServiceFromFlow(
+//            serviceContext,
+//            Constants.PHASE_SERVICE,
+//            service.getInFlow(),
+//            AxisConfiguration.INFLOW);
+//        addPhasesToServiceFromFlow(
+//            serviceContext,
+//            Constants.PHASE_SERVICE,
+//            service.getOutFlow(),
+//            AxisConfiguration.OUTFLOW);
+//        addPhasesToServiceFromFlow(
+//            serviceContext,
+//            Constants.PHASE_SERVICE,
+//            service.getFaultInFlow(),
+//            AxisConfiguration.FAULT_IN_FLOW);
+//    }
 
     public static ServiceDescription createSimpleService(
         QName serviceName,
@@ -80,14 +84,14 @@
         return service;
     }
 
-    public static ServiceContext createServiceContext(
-        ServiceDescription service,
-        ConfigurationContext engineContext)
-        throws AxisFault {
-        ServiceContext serviceContext = new ServiceContext(service, engineContext);
-        createExecutionChains(serviceContext);
-        return serviceContext;
-    }
+//    public static ServiceContext createServiceContext(
+//        ServiceDescription service,
+//        ConfigurationContext engineContext)
+//        throws AxisFault {
+//        ServiceContext serviceContext = new ServiceContext(service, engineContext);
+//        createExecutionChains(serviceContext);
+//        return serviceContext;
+//    }
 
     public static ServiceDescription createSimpleService(
         QName serviceName,
@@ -100,12 +104,16 @@
             opName);
     }
 
-    public static void addHandlers(Flow flow, Phase phase) throws AxisFault {
-        if (flow != null) {
-            int handlerCount = flow.getHandlerCount();
-            for (int i = 0; i < handlerCount; i++) {
-                phase.addHandler(flow.getHandler(i).getHandler());
-            }
-        }
+//    public static void addHandlers(Flow flow, Phase phase) throws AxisFault {
+//        if (flow != null) {
+//            int handlerCount = flow.getHandlerCount();
+//            for (int i = 0; i < handlerCount; i++) {
+//                phase.addHandler(flow.getHandler(i).getHandler());
+//            }
+//        }
+//    }
+    public static void resolvePhases(AxisConfiguration axisconfig,ServiceDescription serviceDesc) throws AxisFault, PhaseException{
+        PhaseResolver pr = new PhaseResolver(axisconfig,serviceDesc);
+        pr.buildchains();
     }
 }

Modified: webservices/axis/trunk/java/modules/samples/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/maven.xml?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/maven.xml (original)
+++ webservices/axis/trunk/java/modules/samples/maven.xml Sun May 15 23:22:51 2005
@@ -8,8 +8,7 @@
     xmlns:deploy="deploy"
     xmlns:ant="jelly:ant">
     <postGoal name="test:compile">
-        <attainGoal name="samples"/>
         <mkdir dir="target/test-resources/samples/modules"/>
-        <copy file="../addressing/target/addressing.mar" tofile="target/test-resources/samples/modules"/>
+        <copy file="../addressing/target/addressing.mar" tofile="target/test-resources/samples/modules/addressing.mar"/>
     </postGoal> 
  </project>

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceive.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceive.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceive.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceive.java Sun May 15 23:22:51 2005
@@ -1,107 +1,116 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.axis.clientapi;
-
-import junit.framework.TestCase;
-import org.apache.axis.addressing.AddressingConstants;
-import org.apache.axis.addressing.EndpointReference;
-import org.apache.axis.context.MessageContext;
-import org.apache.axis.description.ServiceDescription;
-import org.apache.axis.integration.UtilServer;
-import org.apache.axis.soap.SOAPEnvelope;
-import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
-import org.apache.axis.transport.http.SimpleHTTPServer;
-import org.apache.axis.util.Utils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import java.io.FileReader;
-
-public class TestSendReceive extends TestCase {
-    private Log log = LogFactory.getLog(getClass());
-
-    private QName serviceName = new QName("", "EchoXMLService");
-
-    private QName operationName =
-        new QName("http://localhost/my", "echoOMElement");
-
-    private QName transportName =
-        new QName("http://localhost/my", "NullTransport");
-
-    private MessageContext mc;
-
-    private Thread thisThread;
-    private ServiceDescription service;
-
-    private SimpleHTTPServer sas;
-
-    public TestSendReceive() {
-        super(TestSendReceive.class.getName());
-    }
-
-    public TestSendReceive(String testName) {
-        super(testName);
-    }
-
-    protected void setUp() throws Exception {
-        service =
-            Utils.createSimpleService(
-                serviceName,
-                org.apache.axis.engine.Echo.class.getName(),operationName);
-
-       
-
-        UtilServer.start();
-        UtilServer.deployService(Utils.createServiceContext(service,null));
-    }
-
-    protected void tearDown() throws Exception {
-        UtilServer.unDeployService(service.getName());
-        UtilServer.stop();
-    }
-
-    public void testSendReceive() throws Exception {
-
-        SOAPEnvelope envelope = getBasicEnvelope();
-        EndpointReference targetEPR =
-            new EndpointReference(
-                AddressingConstants.WSA_TO,
-                "http://127.0.0.1:"
-                    + UtilServer.TESTING_PORT
-                    + "/axis/services/EchoXMLService");
-        Call call = new Call();
-        call.setTo(targetEPR);
-        SOAPEnvelope responseEnv = (SOAPEnvelope)call.invokeBlocking("echoOMElement",envelope);
-        responseEnv.serializeWithCache(
-            XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
-
-    }
-
-    private SOAPEnvelope getBasicEnvelope() throws Exception {
-
-        SOAPEnvelope envelope =
-            new StAXSOAPModelBuilder(
-                XMLInputFactory.newInstance().createXMLStreamReader(
-                    new FileReader("src/test-resources/clientapi/SimpleSOAPEnvelope.xml")))
-                .getSOAPEnvelope();
-        return envelope;
-    }
-
-}
\ No newline at end of file
+///*
+// * Copyright 2004,2005 The Apache Software Foundation.
+// * 
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// * 
+// *      http://www.apache.org/licenses/LICENSE-2.0
+// * 
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// */
+//
+//package org.apache.axis.clientapi;
+//
+//import junit.framework.TestCase;
+//import org.apache.axis.addressing.AddressingConstants;
+//import org.apache.axis.addressing.EndpointReference;
+//import org.apache.axis.context.MessageContext;
+//import org.apache.axis.description.AxisDescWSDLComponentFactory;
+//import org.apache.axis.description.GlobalDescription;
+//import org.apache.axis.description.OperationDescription;
+//import org.apache.axis.description.ServiceDescription;
+//import org.apache.axis.engine.AxisConfiguration;
+//import org.apache.axis.engine.AxisFault;
+//import org.apache.axis.integration.UtilServer;
+//import org.apache.axis.phaseresolver.PhaseException;
+//import org.apache.axis.phaseresolver.PhaseResolver;
+//import org.apache.axis.soap.SOAPEnvelope;
+//import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
+//import org.apache.axis.transport.http.SimpleHTTPServer;
+//import org.apache.axis.util.Utils;
+//import org.apache.commons.logging.Log;
+//import org.apache.commons.logging.LogFactory;
+//
+//import javax.xml.namespace.QName;
+//import javax.xml.stream.XMLInputFactory;
+//import javax.xml.stream.XMLOutputFactory;
+//import java.io.FileReader;
+//
+//public class TestSendReceive extends TestCase {
+//    private Log log = LogFactory.getLog(getClass());
+//
+//    private QName serviceName = new QName("", "EchoXMLService");
+//
+//    private QName operationName =
+//        new QName("http://localhost/my", "echoOMElement");
+//
+//    private QName transportName =
+//        new QName("http://localhost/my", "NullTransport");
+//
+//    private MessageContext mc;
+//
+//    private Thread thisThread;
+//    private ServiceDescription service;
+//
+//    private SimpleHTTPServer sas;
+//
+//    public TestSendReceive() {
+//        super(TestSendReceive.class.getName());
+//    }
+//
+//    public TestSendReceive(String testName) {
+//        super(testName);
+//    }
+//
+//    protected void setUp() throws Exception {
+//        service =
+//            Utils.createSimpleService(
+//                serviceName,
+//                org.apache.axis.engine.Echo.class.getName(),operationName);
+//
+//       
+//
+//        UtilServer.start();
+//        UtilServer.deployService(Utils.createServiceContext(service,null));
+//    }
+//
+//    protected void tearDown() throws Exception {
+//        UtilServer.unDeployService(service.getName());
+//        UtilServer.stop();
+//    }
+//
+//    public void testSendReceive() throws Exception {
+//
+//        SOAPEnvelope envelope = getBasicEnvelope();
+//        EndpointReference targetEPR =
+//            new EndpointReference(
+//                AddressingConstants.WSA_TO,
+//                "http://127.0.0.1:"
+//                    + UtilServer.TESTING_PORT
+//                    + "/axis/services/EchoXMLService");
+//        Call call = new Call();
+//        call.setTo(targetEPR);
+//        SOAPEnvelope responseEnv = (SOAPEnvelope)call.invokeBlocking("echoOMElement",envelope);
+//        responseEnv.serializeWithCache(
+//            XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
+//
+//    }
+//
+//    private SOAPEnvelope getBasicEnvelope() throws Exception {
+//
+//        SOAPEnvelope envelope =
+//            new StAXSOAPModelBuilder(
+//                XMLInputFactory.newInstance().createXMLStreamReader(
+//                    new FileReader("src/test-resources/clientapi/SimpleSOAPEnvelope.xml")))
+//                .getSOAPEnvelope();
+//        return envelope;
+//    }
+//    
+//
+//
+//}
\ No newline at end of file

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceiveAsync.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceiveAsync.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceiveAsync.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/clientapi/TestSendReceiveAsync.java Sun May 15 23:22:51 2005
@@ -1,152 +1,152 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.axis.clientapi;
-
-import junit.framework.TestCase;
-import org.apache.axis.Constants;
-import org.apache.axis.addressing.AddressingConstants;
-import org.apache.axis.addressing.EndpointReference;
-import org.apache.axis.context.MessageContext;
-import org.apache.axis.description.ServiceDescription;
-import org.apache.axis.integration.UtilServer;
-import org.apache.axis.soap.SOAPEnvelope;
-import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
-import org.apache.axis.transport.http.SimpleHTTPServer;
-import org.apache.axis.util.Utils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import java.io.InputStreamReader;
-
-/**
- * @author Jaliya
- *         <p/>
- *         TODO To change the template for this generated type comment go to
- *         Window - Preferences - Java - Code Style - Code Templates
- */
-public class TestSendReceiveAsync extends TestCase {
-    private Log log = LogFactory.getLog(getClass());
-
-    private QName serviceName = new QName("", "EchoXMLService");
-
-    private QName operationName =
-        new QName("http://localhost/my", "echoOMElement");
-
-    private QName transportName =
-        new QName("http://localhost/my", "NullTransport");
-
-    private MessageContext mc;
-
-    private Thread thisThread;
-
-    private SimpleHTTPServer sas;
-
-    private boolean finish = false;
-
-    private ServiceDescription service;
-
-    private ClassLoader cl;
-
-    /**
-     * @param testName
-     */
-    public TestSendReceiveAsync(String testName) {
-        super(testName);
-        cl = Thread.currentThread().getContextClassLoader();
-    }
-
-    protected void setUp() throws Exception {
-        service =
-            Utils.createSimpleService(
-                serviceName,
-                org.apache.axis.engine.Echo.class.getName(),operationName);
-
-        
-
-        UtilServer.start();
-        UtilServer.deployService(Utils.createServiceContext(service,null));
-    }
-
-    protected void tearDown() throws Exception {
-
-        while (!finish) {
-            Thread.sleep(500);
-        }
-        UtilServer.unDeployService(service.getName());
-
-    }
-
-    public void testSendReceiveAsync() throws Exception {
-
-        SOAPEnvelope envelope = getBasicEnvelope();
-        EndpointReference targetEPR =
-            new EndpointReference(
-                AddressingConstants.WSA_TO,
-                "http://127.0.0.1:"
-                    + UtilServer.TESTING_PORT
-                    + "/axis/services/EchoXMLService");
-        Call call = new Call();
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP,false);
-
-        Callback callback = new Callback() {
-            public void onComplete(AsyncResult result) {
-
-                try {
-                    result.getResponseEnvelope().serializeWithCache(
-                        XMLOutputFactory.newInstance().createXMLStreamWriter(
-                            System.out));
-                } catch (XMLStreamException e) {
-                    reportError(e);
-
-                } finally {
-                    finish = true;
-                }
-            }
-
-            public void reportError(Exception e) {
-                e.printStackTrace();
-            }
-        };
-        call.invokeNonBlocking("echoOMElement",envelope, callback);
-
-    }
-
-    private SOAPEnvelope getBasicEnvelope() throws Exception {
-
-        SOAPEnvelope envelope =
-            new StAXSOAPModelBuilder(
-                XMLInputFactory.newInstance().createXMLStreamReader(
-                    new InputStreamReader(
-                        cl.getResourceAsStream(
-                            "clientapi/SimpleSOAPEnvelope.xml"))))
-                .getSOAPEnvelope();
-
-        /*   File file = new File("./target/test-classes/clientapi/SimpleSOAPEnvelope.xml");
-           XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(file)); //put the file
-        
-           OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory
-                   .newInstance(), xmlStreamReader);
-           return (SOAPEnvelope) builder.getDocumentElement(); */
-        return envelope;
-    }
-
-}
+///*
+// * Copyright 2004,2005 The Apache Software Foundation.
+// * 
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// * 
+// *      http://www.apache.org/licenses/LICENSE-2.0
+// * 
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// */
+//
+//package org.apache.axis.clientapi;
+//
+//import junit.framework.TestCase;
+//import org.apache.axis.Constants;
+//import org.apache.axis.addressing.AddressingConstants;
+//import org.apache.axis.addressing.EndpointReference;
+//import org.apache.axis.context.MessageContext;
+//import org.apache.axis.description.ServiceDescription;
+//import org.apache.axis.integration.UtilServer;
+//import org.apache.axis.soap.SOAPEnvelope;
+//import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
+//import org.apache.axis.transport.http.SimpleHTTPServer;
+//import org.apache.axis.util.Utils;
+//import org.apache.commons.logging.Log;
+//import org.apache.commons.logging.LogFactory;
+//
+//import javax.xml.namespace.QName;
+//import javax.xml.stream.XMLInputFactory;
+//import javax.xml.stream.XMLOutputFactory;
+//import javax.xml.stream.XMLStreamException;
+//import java.io.InputStreamReader;
+//
+///**
+// * @author Jaliya
+// *         <p/>
+// *         TODO To change the template for this generated type comment go to
+// *         Window - Preferences - Java - Code Style - Code Templates
+// */
+//public class TestSendReceiveAsync extends TestCase {
+//    private Log log = LogFactory.getLog(getClass());
+//
+//    private QName serviceName = new QName("", "EchoXMLService");
+//
+//    private QName operationName =
+//        new QName("http://localhost/my", "echoOMElement");
+//
+//    private QName transportName =
+//        new QName("http://localhost/my", "NullTransport");
+//
+//    private MessageContext mc;
+//
+//    private Thread thisThread;
+//
+//    private SimpleHTTPServer sas;
+//
+//    private boolean finish = false;
+//
+//    private ServiceDescription service;
+//
+//    private ClassLoader cl;
+//
+//    /**
+//     * @param testName
+//     */
+//    public TestSendReceiveAsync(String testName) {
+//        super(testName);
+//        cl = Thread.currentThread().getContextClassLoader();
+//    }
+//
+//    protected void setUp() throws Exception {
+//        service =
+//            Utils.createSimpleService(
+//                serviceName,
+//                org.apache.axis.engine.Echo.class.getName(),operationName);
+//
+//        
+//
+//        UtilServer.start();
+//        UtilServer.deployService(Utils.createServiceContext(service,null));
+//    }
+//
+//    protected void tearDown() throws Exception {
+//
+//        while (!finish) {
+//            Thread.sleep(500);
+//        }
+//        UtilServer.unDeployService(service.getName());
+//
+//    }
+//
+//    public void testSendReceiveAsync() throws Exception {
+//
+//        SOAPEnvelope envelope = getBasicEnvelope();
+//        EndpointReference targetEPR =
+//            new EndpointReference(
+//                AddressingConstants.WSA_TO,
+//                "http://127.0.0.1:"
+//                    + UtilServer.TESTING_PORT
+//                    + "/axis/services/EchoXMLService");
+//        Call call = new Call();
+//        call.setTo(targetEPR);
+//        call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP,false);
+//
+//        Callback callback = new Callback() {
+//            public void onComplete(AsyncResult result) {
+//
+//                try {
+//                    result.getResponseEnvelope().serializeWithCache(
+//                        XMLOutputFactory.newInstance().createXMLStreamWriter(
+//                            System.out));
+//                } catch (XMLStreamException e) {
+//                    reportError(e);
+//
+//                } finally {
+//                    finish = true;
+//                }
+//            }
+//
+//            public void reportError(Exception e) {
+//                e.printStackTrace();
+//            }
+//        };
+//        call.invokeNonBlocking("echoOMElement",envelope, callback);
+//
+//    }
+//
+//    private SOAPEnvelope getBasicEnvelope() throws Exception {
+//
+//        SOAPEnvelope envelope =
+//            new StAXSOAPModelBuilder(
+//                XMLInputFactory.newInstance().createXMLStreamReader(
+//                    new InputStreamReader(
+//                        cl.getResourceAsStream(
+//                            "clientapi/SimpleSOAPEnvelope.xml"))))
+//                .getSOAPEnvelope();
+//
+//        /*   File file = new File("./target/test-classes/clientapi/SimpleSOAPEnvelope.xml");
+//           XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(file)); //put the file
+//        
+//           OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory
+//                   .newInstance(), xmlStreamReader);
+//           return (SOAPEnvelope) builder.getDocumentElement(); */
+//        return envelope;
+//    }
+//
+//}

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java Sun May 15 23:22:51 2005
@@ -76,7 +76,7 @@
                 serviceName,
                 org.apache.axis.engine.Echo.class.getName(),
                 operationName);
-        UtilServer.deployService(Utils.createServiceContext(service, null));
+        Utils.resolvePhases(engineRegistry,service);
     }
 
     protected void tearDown() throws Exception {

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java Sun May 15 23:22:51 2005
@@ -88,7 +88,7 @@
         service.setInFlow(flow);
         
         UtilServer.start();
-        UtilServer.deployService(Utils.createServiceContext(service,null));
+        UtilServer.deployService(service);
         try {
             callTheService();
         } finally {
@@ -123,7 +123,7 @@
         service.addOperation(operation);
 
         UtilServer.start();
-        UtilServer.deployService(Utils.createServiceContext(service,null));
+        UtilServer.deployService(service);
         try {
             callTheService();
         } finally {

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java Sun May 15 23:22:51 2005
@@ -71,7 +71,7 @@
         OperationDescription operation = new OperationDescription(operationName);
         service.addOperation(operation);
 
-        UtilServer.deployService(Utils.createServiceContext(service,null));
+        UtilServer.deployService(service);
     }
 
     protected void tearDown() throws Exception {

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java?rev=170319&r1=170318&r2=170319&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java Sun May 15 23:22:51 2005
@@ -19,8 +19,11 @@
 import org.apache.axis.context.ConfigurationContext;
 import org.apache.axis.context.EngineContextFactory;
 import org.apache.axis.context.ServiceContext;
+import org.apache.axis.description.ServiceDescription;
+import org.apache.axis.engine.AxisConfiguration;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.transport.http.SimpleHTTPServer;
+import org.apache.axis.util.Utils;
 
 import javax.xml.namespace.QName;
 import java.io.File;
@@ -34,10 +37,10 @@
 
 
 
-    public static synchronized void deployService(ServiceContext service)
+    public static synchronized void deployService(ServiceDescription service)
             throws AxisFault {
-        reciver.getSystemContext().registerServiceContext(service.getServiceInstanceID(),service);
-        reciver.getSystemContext().getEngineConfig().addService(service.getServiceConfig());
+        reciver.getSystemContext().getEngineConfig().addService(service);        
+        Utils.resolvePhases(reciver.getSystemContext().getEngineConfig(),service);
     }
 
     public static synchronized void unDeployService(QName service)
@@ -49,7 +52,7 @@
         if (count == 0) {
             EngineContextFactory erfac = new EngineContextFactory();
             
-            File file = new File("target/test-resources/samples");
+            File file = new File("modules/samples/target/test-resources/samples");
             System.out.println(new File(file,"server.xml").exists());
             ConfigurationContext er = erfac.buildEngineContext(file.getAbsolutePath());
             try {