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 he...@apache.org on 2005/05/09 10:00:02 UTC

svn commit: r169249 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/clientapi/ core/src/org/apache/axis/context/ core/src/org/apache/axis/engine/ core/src/org/apache/axis/transport/http/ core/src/org/apache/axis/transport/mail/ core/test/org/apache/axis/deployment/ core/test/org/apache/axis/engine/ samples/test/org/apache/axis/integration/

Author: hemapani
Date: Mon May  9 01:00:00 2005
New Revision: 169249

URL: http://svn.apache.org/viewcvs?rev=169249&view=rev
Log:
clean the context

Added:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java
Removed:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/EngineContextFactory.java
Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListner.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java Mon May  9 01:00:00 2005
@@ -328,6 +328,8 @@
         callbackService.addOperation(axisOperation);
         axisOperation.setMessageReciever(callbackReceiver);
         listenerManager.makeSureStarted();
-        listenerManager.getEngineContext().addService(new ServiceContext(callbackService, null));
+        
+        ServiceContext serviceContext = new ServiceContext(callbackService, null);
+        listenerManager.getEngineContext().registerServiceContext(serviceContext.getServiceInstanceID(),serviceContext);
     }
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContext.java Mon May  9 01:00:00 2005
@@ -30,82 +30,51 @@
 import org.apache.axis.engine.EngineConfiguration;
 import org.apache.axis.storage.AxisStorage;
 
-public class EngineContext extends AbstractContext implements PhasesInclude{
+public class EngineContext extends AbstractContext implements PhasesInclude {
 
     private EngineConfiguration engineConfig;
     private AxisStorage storage;
 
-    
     private Map sessionContextMap;
     private Map moduleContextMap;
-    
+
     /**
      * Map containing <code>MessageID</code> to 
      * <code>OperationContext</code> mapping.
      */
     private final Map operationContextMap = new HashMap();
-    
-    
-    private final Map serviceContextMap;
-
 
+    private final Map serviceContextMap;
 
     private PhasesInclude phaseInclude;
-    
-    public EngineContext(EngineConfiguration registry){
+
+    public EngineContext(EngineConfiguration registry) {
         super(null);
         this.engineConfig = registry;
         serviceContextMap = new HashMap();
         moduleContextMap = new HashMap();
         sessionContextMap = new HashMap();
         phaseInclude = new PhasesIncludeImpl();
-      
+
     }
-    
+
     /**
      * The method is used to do the intialization of the EngineContext, right now we know that
      * module.init(..) is called here
      * @throws AxisFault
      */
-    
-    
-    public void init() throws AxisFault{
-    
-    }
-    
-    
-    public void addService(ServiceContext service){
-        serviceContextMap.put(service.getServiceConfig().getName(),service);
-    }
-    
-    public void removeService(QName name){
-        serviceContextMap.remove(name);
-    }
-    
-    public ServiceContext getService(QName serviceName){
-    	// change QName to String above
-    	// - look up service name in registry of deployed services (in myself and if not look up in my parent engineConfig
-    	// - if not found error
-    	// - if found, look for reference properties
-    	// - if have reference properties, use ref prop as key to find the servicecontext
-    	// - if no ref props create new servicecontext
-    	// - return servicecontext
-        return (ServiceContext)serviceContextMap.get(serviceName);
-    
-    }
-    
-    
-
-    
-
-
 
+    public void init() throws AxisFault {
 
+    }
 
+    public void removeService(QName name) {
+        serviceContextMap.remove(name);
+    }
 
     /**
-     * @return
-     */
+    * @return
+    */
     public EngineConfiguration getEngineConfig() {
         return engineConfig;
     }
@@ -117,7 +86,6 @@
         engineConfig = configuration;
     }
 
-  
     /**
      * @param flow
      * @return
@@ -135,42 +103,30 @@
     public void setPhases(ArrayList phases, int flow) throws AxisFault {
         phaseInclude.setPhases(phases, flow);
     }
-    
-    
-    public void registerOperationContext(String messageID, OperationContext mepContext){
+
+    public void registerOperationContext(String messageID, OperationContext mepContext) {
         this.operationContextMap.put(messageID, mepContext);
     }
-    
-    public OperationContext getOperationContext(String messageID){        
-    	return(OperationContext)this.operationContextMap.get(messageID);
-    }
-     
-   
-    public Map getOperationContextMap(){
-    	return this.operationContextMap;
-    }
-
-    
-    public void registerServiceContext(String serviceInstanceID, ServiceContext serviceContext){
-    	this.serviceContextMap.put(serviceInstanceID, serviceContext);
-    }
-    
-    public ServiceContext getServiceContext(String serviceInstanceID){
-    	return (ServiceContext)this.serviceContextMap.get(serviceInstanceID);
-    }    
-    
-	/**
-	 * @return Returns the serviceContextMap.
-	 */
-	public Map getServiceContextMap() {
-		return serviceContextMap;
-	}
 
-    
+    public OperationContext getOperationContext(String messageID) {
+        return (OperationContext) this.operationContextMap.get(messageID);
+    }
+
+    public Map getOperationContextMap() {
+        return this.operationContextMap;
+    }
+
+    public void registerServiceContext(String serviceInstanceID, ServiceContext serviceContext) {
+        this.serviceContextMap.put(serviceInstanceID, serviceContext);
+    }
+
+    public ServiceContext getServiceContext(String serviceInstanceID) {
+        return (ServiceContext) this.serviceContextMap.get(serviceInstanceID);
+    }
+
     public AxisStorage getStorage() {
         return storage;
     }
-
 
     public void setStorage(AxisStorage storage) {
         this.storage = storage;

Added: 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=169249&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java Mon May  9 01:00:00 2005
@@ -0,0 +1,126 @@
+package org.apache.axis.context;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.deployment.DeploymentEngine;
+import org.apache.axis.deployment.DeploymentException;
+import org.apache.axis.description.AxisModule;
+import org.apache.axis.description.AxisOperation;
+import org.apache.axis.description.AxisService;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.EngineConfiguration;
+import org.apache.axis.engine.EngineConfigurationImpl;
+import org.apache.axis.modules.Module;
+import org.apache.axis.phaseresolver.PhaseException;
+import org.apache.axis.phaseresolver.PhaseResolver;
+
+/**
+ * Created by IntelliJ IDEA.
+ * Author : Deepal Jayasinghe
+ * Date: Apr 19, 2005
+ * Time: 10:44:38 AM
+ */
+public class EngineContextFactory {
+
+    public EngineContext buildEngineContext(String RepositaryName) throws DeploymentException {
+        EngineContext engineContext = null;
+        try {
+            DeploymentEngine deploymentEngine = new DeploymentEngine(RepositaryName);
+            EngineConfiguration configuration = deploymentEngine.load();
+            PhaseResolver phaseResolver = new PhaseResolver(configuration);
+            engineContext = phaseResolver.buildGlobalChains();
+            phaseResolver.buildTranspotsChains();
+            initModules(engineContext);
+        } catch (AxisFault axisFault) {
+            throw new DeploymentException(axisFault.getMessage()) ;
+        } catch (PhaseException e) {
+            throw new DeploymentException(e.getMessage()) ;
+        }
+        return engineContext;
+    }
+
+    public EngineContext buildClientEngineContext(String axis2home) throws DeploymentException {
+            EngineContext engineContext = null;
+            try {
+                DeploymentEngine deploymentEngine = new DeploymentEngine(axis2home);
+                EngineConfiguration configuration = deploymentEngine.loadClient();
+                PhaseResolver phaseResolver = new PhaseResolver(configuration);
+                engineContext = phaseResolver.buildGlobalChains();
+                phaseResolver.buildTranspotsChains();
+                initModules(engineContext);
+            } catch (AxisFault axisFault) {
+                throw new DeploymentException(axisFault.getMessage()) ;
+            } catch (PhaseException e) {
+                throw new DeploymentException(e.getMessage()) ;
+            }
+            return engineContext;
+        }
+
+   /**
+    * Is used to initilize the modules , if the module needs to so some recovery process
+    * it can do inside init and this is differnt form module.engage()
+    * @param context
+    * @throws DeploymentException
+    */
+
+
+    private void initModules(EngineContext context) throws DeploymentException {
+        try{
+            HashMap modules = ((EngineConfigurationImpl)context.getEngineConfig()).getModules();
+            Collection col = modules.values();
+            for (Iterator iterator = col.iterator(); iterator.hasNext();) {
+                AxisModule  axismodule = (AxisModule)iterator.next();
+                Module module = axismodule.getModule();
+                if(module != null ){
+                    module.init(context);
+                }
+            }
+        }catch (AxisFault e){
+            throw new DeploymentException(e.getMessage());
+        }
+    }
+
+//    public ServiceContext createServiceContext(AxisService service,EngineContext context) throws PhaseException {
+//        try {
+//            ServiceContext serviceContext = new ServiceContext(service,context);
+//            PhaseResolver reolve = new PhaseResolver(context.getEngineConfig(),serviceContext);
+//            context.addService(serviceContext);
+//            serviceContext = reolve.buildchains();
+//            engageModules(service,context);
+//            return serviceContext;
+//        } catch (PhaseException e) {
+//            throw new PhaseException(e.getMessage()) ;
+//        } catch (AxisFault axisFault) {
+//            throw new PhaseException(axisFault.getMessage()) ;
+//        }
+//    }
+
+    private void engageModules(AxisService service,EngineContext context) throws AxisFault {
+       ArrayList servicemodules = (ArrayList)service.getModules();
+       ArrayList opModules ;
+       Module module ;
+       Collection operations = service.getOperations().values();
+       for (Iterator iterator = operations.iterator(); iterator.hasNext();) {
+           AxisOperation operation = (AxisOperation) iterator.next();
+           opModules = (ArrayList)operation.getModules();
+           for (int i = 0; i < servicemodules.size(); i++) {
+               QName moduleName = (QName) servicemodules.get(i);
+               module = context.getEngineConfig().getModule(moduleName).getModule();
+               //todo AxisOperation shoud have a method to get chains
+               /*ExecutionChain inchain = new ExecutionChain();
+               inchain.addPhases(operation.getPhases(EngineConfiguration.INFLOW));
+               module.engage(inchain);*/
+           }
+           for (int i = 0; i < opModules.size(); i++) {
+               QName moduleName = (QName) opModules.get(i);
+               module = context.getEngineConfig().getModule(moduleName).getModule();
+           }
+
+       }
+    }
+}

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java Mon May  9 01:00:00 2005
@@ -15,8 +15,6 @@
  */
 package org.apache.axis.context;
 
-import java.util.Map;
-
 import org.apache.axis.addressing.EndpointReference;
 import org.apache.axis.addressing.MessageInformationHeadersCollection;
 import org.apache.axis.addressing.miheaders.RelatesTo;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java Mon May  9 01:00:00 2005
@@ -36,12 +36,12 @@
 import org.apache.axis.Constants;
 import org.apache.axis.addressing.AddressingConstants;
 import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.context.EngineContextFactory;
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.SessionContext;
 import org.apache.axis.engine.AxisEngine;
 import org.apache.axis.engine.AxisFault;
-import org.apache.axis.engine.EngineContextFactory;
 import org.apache.axis.om.SOAPEnvelope;
 import org.apache.axis.om.impl.llom.builder.StAXBuilder;
 import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
@@ -88,11 +88,8 @@
         try {
             ServletContext context = config.getServletContext();
             String repoDir = context.getRealPath("/WEB-INF");
-            Class erClass = Class.forName(
-                    "org.apache.axis.deployment.EngineRegistryFactoryImpl");
-            EngineContextFactory erfac =
-                    (EngineContextFactory) erClass.newInstance();
-            engineContext = erfac.createContextBuilder(repoDir);
+            EngineContextFactory erfac = new EngineContextFactory();
+            engineContext = erfac.buildEngineContext(repoDir);
         } catch (Exception e) {
             throw new ServletException(e);
         }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java Mon May  9 01:00:00 2005
@@ -27,11 +27,11 @@
 
 import org.apache.axis.Constants;
 import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.context.EngineContextFactory;
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.description.AxisTransportOut;
 import org.apache.axis.engine.AxisFault;
-import org.apache.axis.engine.EngineContextFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -91,8 +91,8 @@
         try {
             this.serverSocket = serverSoc;
             Class erClass = Class.forName("org.apache.axis.deployment.EngineContextFactoryImpl");
-            EngineContextFactory erfac = (EngineContextFactory) erClass.newInstance();
-            this.engineReg = erfac.createContextBuilder(dir);
+            EngineContextFactory erfac = new EngineContextFactory();
+            this.engineReg = erfac.buildEngineContext(dir);
             Thread.sleep(2000);
         } catch (Exception e1) {
             throw new AxisFault("Thread interuptted", e1);
@@ -140,7 +140,8 @@
                                 null,
                                 engineReg.getEngineConfig().getTransportIn(
                                     new QName(Constants.TRANSPORT_HTTP)),
-                                transportOut,engineReg);
+                                transportOut,
+                                engineReg);
                         msgContext.setServerSide(true);
 
                         // We do not have any Addressing Headers to put
@@ -148,7 +149,7 @@
                         msgContext.setProperty(MessageContext.TRANSPORT_WRITER, out);
                         msgContext.setProperty(MessageContext.TRANSPORT_READER, in);
                         HTTPTransportReceiver reciver = new HTTPTransportReceiver();
-                        reciver.invoke(msgContext,engineReg);
+                        reciver.invoke(msgContext, engineReg);
 
                         if (msgContext.getReplyTo() != null
                             && !AddressingConstants.EPR_ANONYMOUS_URL.equals(

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListner.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListner.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListner.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListner.java Mon May  9 01:00:00 2005
@@ -24,7 +24,7 @@
 import javax.mail.Session;
 import javax.mail.internet.MimeMessage;
 
-import org.apache.axis.context.ContextBuilder;
+import org.apache.axis.context.EngineContextFactory;
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.engine.AxisEngine;
 import org.apache.axis.engine.EngineConfiguration;
@@ -74,7 +74,7 @@
         this.userid = userid;
         this.password = password;
         try {
-            ContextBuilder builder = new ContextBuilder();
+            EngineContextFactory builder = new EngineContextFactory();
             er = builder.buildEngineContext(dir);
         } catch (Exception e) {
             e.printStackTrace();

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java Mon May  9 01:00:00 2005
@@ -19,7 +19,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.axis.AbstractTestCase;
-import org.apache.axis.context.ContextBuilder;
+import org.apache.axis.context.EngineContextFactory;
 import org.apache.axis.description.AxisOperation;
 import org.apache.axis.description.AxisService;
 import org.apache.axis.description.Flow;
@@ -35,7 +35,7 @@
 
     public void testDeployment() throws Exception {
         String filename = "./target/test-resources/deployment";
-        ContextBuilder builder = new ContextBuilder();
+        EngineContextFactory builder = new EngineContextFactory();
         EngineConfiguration er = builder.buildEngineContext(filename).getEngineConfig();
 
         assertNotNull(er);

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java Mon May  9 01:00:00 2005
@@ -20,7 +20,7 @@
 
 import junit.framework.TestCase;
 
-import org.apache.axis.context.ContextBuilder;
+import org.apache.axis.context.EngineContextFactory;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineConfiguration;
 import org.apache.axis.phaseresolver.PhaseException;
@@ -31,7 +31,7 @@
     public void testparseService1() throws PhaseException, DeploymentException, AxisFault, XMLStreamException {
         String filename = "./target/test-resources/deployment";
 
-        ContextBuilder builder = new ContextBuilder();
+        EngineContextFactory builder = new EngineContextFactory();
         er = builder.buildEngineContext(filename).getEngineConfig();
     }
 

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java?rev=169249&r1=169248&r2=169249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java Mon May  9 01:00:00 2005
@@ -107,7 +107,7 @@
         phases.add(phase1);
         
         ServiceContext serviceContext = new ServiceContext(service,engineContext);
-        engineContext.addService(serviceContext);
+        engineContext.registerServiceContext(serviceContext.getServiceInstanceID(),serviceContext);
 
 //TODO
 //        serviceContext.setPhases(phases, EngineConfiguration.INFLOW);

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=169249&r1=169248&r2=169249&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 Mon May  9 01:00:00 2005
@@ -21,10 +21,10 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.axis.context.EngineContextFactory;
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.ServiceContext;
 import org.apache.axis.engine.AxisFault;
-import org.apache.axis.engine.EngineContextFactory;
 import org.apache.axis.transport.http.SimpleHTTPServer;
 
 public class UtilServer {
@@ -37,7 +37,7 @@
 
     public static synchronized void deployService(ServiceContext service)
             throws AxisFault {
-        reciver.getEngineReg().addService(service);
+        reciver.getEngineReg().registerServiceContext(service.getServiceInstanceID(),service);
         reciver.getEngineReg().getEngineConfig().addService(service.getServiceConfig());
     }
 
@@ -49,11 +49,11 @@
     public static synchronized void start() throws Exception {
         if (count == 0) {
             Class erClass = Class.forName("org.apache.axis.deployment.EngineContextFactoryImpl");
-            EngineContextFactory erfac = (EngineContextFactory)erClass.newInstance();
+            EngineContextFactory erfac = new EngineContextFactory();
             
             File file = new File("target/test-resources/samples");
             System.out.println(new File(file,"server.xml").exists());
-            EngineContext er = erfac.createContextBuilder(file.getAbsolutePath());
+            EngineContext er = erfac.buildEngineContext(file.getAbsolutePath());
             try {
                 Thread.sleep(2000);
             } catch (InterruptedException e1) {