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 ch...@apache.org on 2005/11/25 16:13:39 UTC

svn commit: r348964 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/template/java/ core/src/org/apache/axis2/client/ core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/description/ core/src/org/apache/axis2/en...

Author: chinthaka
Date: Fri Nov 25 07:13:04 2005
New Revision: 348964

URL: http://svn.apache.org/viewcvs?rev=348964&view=rev
Log:
1.We have a problem in the client side as all the clients are sharing the same config context, irrepective of the client home (repository in the client side) given. One place this is being used is within the ListenerManager (it has a *static* config context). The solution is to pass the configuration context into the ListenerManager and have it use that as a key to start specific listeners for specific transports. We have changed the code to do this.
   2.Re-factored the assumeServiceContext stuff from Call and MessageSender to MEPClient and cleaned up related artifacts to make the ListenerManager stuff work.

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Call.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MessageSender.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/service1/META-INF/services.xml
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/service2/META-INF/services.xml
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
    webservices/axis2/trunk/java/modules/integration/itest/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Fri Nov 25 07:13:04 2005
@@ -40,7 +40,11 @@
            __operation = new org.apache.axis2.description.OutInAxisOperation();
            __operation.setName(new javax.xml.namespace.QName("<xsl:value-of select="@namespace"/>", "<xsl:value-of select="@name"/>"));
            _operations[<xsl:value-of select="position()-1"/>]=__operation;
+            try{
            _service.addOperation(__operation);
+          }catch(org.apache.axis2.AxisFault e){
+            throw new RuntimeException(e);
+          }
      </xsl:for-each>
        }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Call.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Call.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Call.java Fri Nov 25 07:13:04 2005
@@ -17,8 +17,6 @@
 package org.apache.axis2.client;
 
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.deployment.util.PhasesInfo;
@@ -26,6 +24,7 @@
 import org.apache.axis2.description.AxisOperationFactory;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.OutInAxisOperation;
+import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisConfigurationImpl;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.soap.SOAPEnvelope;
@@ -48,7 +47,7 @@
 
     public Call() throws AxisFault {
         super(null);
-        setServiceContext(assumeServiceContext(null));
+        assumeServiceContext(null);
     }
 
     /**
@@ -59,7 +58,7 @@
      */
     public Call(String clientHome) throws AxisFault {
         super(null);
-        setServiceContext(assumeServiceContext(clientHome));
+        assumeServiceContext(clientHome);
     }
 
     /**
@@ -72,7 +71,8 @@
 
     /**
      * Invokes the blocking/synchronous call.
-     *s
+     * s
+     *
      * @param axisop - this is used to identify the operation on the client side explicitly.
      * @param toSend - data to be sent (OMElement).
      * @return
@@ -84,7 +84,7 @@
 
         AxisOperation opDesc =
                 serviceContext.getAxisService().getOperation(new QName(axisop));
-        opDesc = createOpDescAndFillInFlowInformation(opDesc,axisop,WSDLConstants.MEP_CONSTANT_OUT_IN);
+        opDesc = createOpDescAndFillInFlowInformation(opDesc, axisop, WSDLConstants.MEP_CONSTANT_OUT_IN);
         opDesc.setParent(serviceContext.getAxisService());
         MessageContext msgctx = prepareTheSOAPEnvelope(toSend);
 
@@ -96,7 +96,7 @@
     /**
      * Invokes the blocking/synchronous call
      *
-     * @param axisop - this is used to identify the operation on the client side explicitly.
+     * @param axisop   - this is used to identify the operation on the client side explicitly.
      * @param envelope - data to be sent (SOAPEnvelope).
      * @return
      * @throws AxisFault
@@ -106,10 +106,10 @@
 
         AxisOperation opDesc =
                 serviceContext.getAxisService().getOperation(new QName(axisop));
-        opDesc = createOpDescAndFillInFlowInformation(opDesc,axisop, WSDLConstants.MEP_CONSTANT_OUT_IN);
+        opDesc = createOpDescAndFillInFlowInformation(opDesc, axisop, WSDLConstants.MEP_CONSTANT_OUT_IN);
 
         MessageContext msgctx = new MessageContext(serviceContext.getConfigurationContext());
-        if(envelope == null || envelope.getBody() == null){
+        if (envelope == null || envelope.getBody() == null) {
             throw new AxisFault("SOAP envelope or SOAP Body can not be null");
         }
         msgctx.setEnvelope(envelope);
@@ -134,16 +134,17 @@
             throws AxisFault {
         AxisOperation opDesc =
                 serviceContext.getAxisService().getOperation(new QName(axisop));
-        opDesc = createOpDescAndFillInFlowInformation(opDesc,axisop,WSDLConstants.MEP_CONSTANT_OUT_IN);
+        opDesc = createOpDescAndFillInFlowInformation(opDesc, axisop, WSDLConstants.MEP_CONSTANT_OUT_IN);
         MessageContext msgctx = prepareTheSOAPEnvelope(toSend);
         //call the underline implementation
         super.invokeNonBlocking(opDesc, msgctx, callback);
     }
+
     /**
      * Invokes the nonblocking/asynchronous call
      *
      * @param axisop
-     * @param envelope   -  data to be sent (SOAPEnvelope).
+     * @param envelope -  data to be sent (SOAPEnvelope).
      * @param callback
      * @throws org.apache.axis2.AxisFault
      */
@@ -155,10 +156,10 @@
             throws AxisFault {
         AxisOperation opDesc =
                 serviceContext.getAxisService().getOperation(new QName(axisop));
-        opDesc = createOpDescAndFillInFlowInformation(opDesc,axisop,WSDLConstants.MEP_CONSTANT_OUT_IN);
+        opDesc = createOpDescAndFillInFlowInformation(opDesc, axisop, WSDLConstants.MEP_CONSTANT_OUT_IN);
 
         MessageContext msgctx = new MessageContext(serviceContext.getConfigurationContext());
-        if(envelope == null || envelope.getBody() == null){
+        if (envelope == null || envelope.getBody() == null) {
             throw new AxisFault("SOAP envelope or SOAP Body can not be null");
         }
         msgctx.setEnvelope(envelope);
@@ -166,8 +167,24 @@
         super.invokeNonBlocking(opDesc, msgctx, callback);
     }
 
+    protected void assumeServiceContext(String clientHome)
+            throws AxisFault {
+
+        super.assumeServiceContext(clientHome);
+        AxisService axisService = serviceContext.getAxisService();
+        axisOperationTemplate = new OutInAxisOperation(new QName("TemplateOperation"));
+
+        AxisConfiguration axisConfiguration = serviceContext.getConfigurationContext().getAxisConfiguration();
+        PhasesInfo info = ((AxisConfigurationImpl) axisConfiguration).getPhasesinfo();
+        //to set the operation flows
+        if (info != null) {
+            info.setOperationPhases(axisOperationTemplate);
+        }
+        axisService.addOperation(axisOperationTemplate);
+    }
+
     /**
-     * Creates an operation description if it is null and copies the flows from 
+     * Creates an operation description if it is null and copies the flows from
      * the template operation.
      *
      * @param opDesc
@@ -175,7 +192,7 @@
      */
     protected AxisOperation createOpDescAndFillInFlowInformation(
             AxisOperation opDesc,
-            String axisOp , int mepURL) throws AxisFault {
+            String axisOp, int mepURL) throws AxisFault {
         if (opDesc == null) {
             //if the operation is not already defined we will copy the
             //created Phases from the template operation to this Operation
@@ -195,45 +212,8 @@
     }
 
     /**
-     * Assumes the values for the ConfigurationContext and ServiceContext to make the NON WSDL cases simple.
-     *
-     * @return ServiceContext that has a ConfigurationContext set in and has assumed values.
-     * @throws org.apache.axis2.AxisFault
-     */
-    protected ServiceContext assumeServiceContext(String clientHome)
-            throws AxisFault {
-        ConfigurationContext sysContext = null;
-        //we are trying to keep one configuration Context at the Client side. That make it easier to
-        //manage the TransportListeners. But using the static referance is bit crude!.
-        if (ListenerManager.configurationContext == null) {
-            ConfigurationContextFactory efac =
-                    new ConfigurationContextFactory();
-            sysContext = efac.buildClientConfigurationContext(clientHome);
-        } else {
-            sysContext = ListenerManager.configurationContext;
-        }
-        QName assumedServiceName = new QName("AnonymousService");
-        AxisService axisService =sysContext.getAxisConfiguration().getService("AnonymousService");
-        if(axisService == null) {
-            //we will assume a Service and operations
-            axisService = new AxisService(assumedServiceName);
-
-            axisOperationTemplate = new   OutInAxisOperation(new QName("TemplateOperation"));
-
-            PhasesInfo info =((AxisConfigurationImpl)sysContext.getAxisConfiguration()).getPhasesinfo();
-            //to set the operation flows
-            if(info != null){
-                info.setOperationPhases(axisOperationTemplate);
-            }
-            axisService.addOperation(axisOperationTemplate);
-            sysContext.getAxisConfiguration().addService(axisService);
-        }
-        return axisService.getParent().getServiceGroupContext(sysContext).getServiceContext(
-                assumedServiceName.getLocalPart());
-    }
-
-    /**
      * Get the value corresponding to the key in the Service Context
+     *
      * @param key
      * @return value
      */
@@ -243,6 +223,7 @@
 
     /**
      * Set a property in the Service Context
+     *
      * @param key
      * @param value
      */
@@ -252,7 +233,7 @@
 
     /**
      * Get the MessageContext of the response
-     * 
+     *
      * @return message context
      */
     public MessageContext getResponseMessageContext() {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java Fri Nov 25 07:13:04 2005
@@ -41,9 +41,9 @@
 import javax.xml.namespace.QName;
 
 /**
- * This class captures the handling of In-Out type method invocations for both blocking 
- * and non-blocking calls. The basic API is based on MessageContext and 
- * provides more convenient APIs. 
+ * This class captures the handling of In-Out type method invocations for both blocking
+ * and non-blocking calls. The basic API is based on MessageContext and
+ * provides more convenient APIs.
  */
 public class InOutMEPClient extends MEPClient {
 
@@ -58,7 +58,7 @@
     protected TransportInDescription listenerTransport;
 
     /**
-     * Used to specify whether the two SOAP Messages are be sent over same channel 
+     * Used to specify whether the two SOAP Messages are be sent over same channel
      * or over separate channels.The value of this variable depends on the transport specified.
      * For e.g., if the transports are different this is true by default.
      * HTTP transport supports both cases while SMTP transport supports only two channel case.
@@ -88,11 +88,11 @@
      * <p/>
      * Following code works for the time being. <p/>
      * <blockquote><pre>
-     * ConfigurationContextFactory efac = new ConfigurationContextFactory(); 
+     * ConfigurationContextFactory efac = new ConfigurationContextFactory();
      * // Replace the null with your client repository if any
      * ConfigurationContext sysContext = efac.buildClientConfigurationContext(null);
      * // above line "null" may be a file name if you know the client repssitory
-     * 
+     * <p/>
      * //create new service
      * QName assumedServiceName = new QName("Your Service");
      * AxisService axisService = new AxisService(assumedServiceName);
@@ -238,10 +238,9 @@
 
                 //set the replyto such that the response will arrive at the transport listener started
                 // Note that this will only change the replyTo Address property in the replyTo EPR
-                EndpointReference replyToFromTransport = ListenerManager.replyToEPR(serviceContext
-                        .getAxisService()
-                        .getName()
-                        .getLocalPart()
+                EndpointReference replyToFromTransport = ListenerManager.replyToEPR(
+                        serviceContext.getConfigurationContext(),
+                        serviceContext.getAxisService().getName().getLocalPart()
                         + "/"
                         + axisop.getName().getLocalPart(),
                         listenerTransport.getName().getLocalPart());
@@ -273,7 +272,7 @@
     }
 
     /**
-     * Sets transport information to the call. The senarios supported are as follows: 
+     * Sets transport information to the call. The senarios supported are as follows:
      * <blockquote><pre>
      * [senderTransport, listenerTransport, useSeparateListener]
      * http, http, true
@@ -384,7 +383,7 @@
      * requests sent, the call should be closed only when all are are done.
      */
     public void close() throws AxisFault {
-        ListenerManager.stop(listenerTransport.getName().getLocalPart());
+        ListenerManager.stop(serviceContext.getConfigurationContext(), listenerTransport.getName().getLocalPart());
     }
 
     /**
@@ -458,14 +457,14 @@
 
     /**
      * Sends the message using a two way transport and waits for a response
-     * 
+     *
      * @param msgctx
      * @param transportIn
      * @return
      * @throws AxisFault
      */
     public MessageContext send(MessageContext msgctx,
-                                      TransportInDescription transportIn) throws AxisFault {
+                               TransportInDescription transportIn) throws AxisFault {
 
         AxisEngine engine = new AxisEngine(msgctx.getSystemContext());
         engine.send(msgctx);
@@ -477,8 +476,8 @@
                         msgctx.getTransportIn(),
                         msgctx.getTransportOut());
         response.setProperty(MessageContext.TRANSPORT_IN,
-                             msgctx.getProperty(MessageContext.TRANSPORT_IN));
-        msgctx.getAxisOperation().registerOperationContext(response,msgctx.getOperationContext());
+                msgctx.getProperty(MessageContext.TRANSPORT_IN));
+        msgctx.getAxisOperation().registerOperationContext(response, msgctx.getOperationContext());
         response.setServerSide(false);
         response.setServiceContext(msgctx.getServiceContext());
         response.setServiceGroupContext(msgctx.getServiceGroupContext());

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java Fri Nov 25 07:13:04 2005
@@ -27,86 +27,95 @@
 import java.io.IOException;
 import java.net.ServerSocket;
 import java.util.HashMap;
+import java.util.Map;
 
 /**
- * This class manages the listeners and depends heavily on static constructs and should be 
+ * This class manages the listeners and depends heavily on static constructs and should be
  * re-architectured. It allows the client to initialize only one ConfigurationContext in a given JVM.
  */
 public class ListenerManager {
 
     public static int port = 6059;
-    public static HashMap listeners = new HashMap();
-    public static ConfigurationContext configurationContext;
+    public static Map configurationContextMap = new HashMap();
 
     /**
-     * Starts a listener for a given transport if it has not already started. 
+     * Starts a listener for a given transport if it has not already started.
+     *
      * @param transport
      * @param configurationContext
      * @throws AxisFault
      */
     public static synchronized final void makeSureStarted(String transport,
-                                             ConfigurationContext configurationContext)
+                                                          ConfigurationContext configurationContext)
             throws AxisFault {
-        if (ListenerManager.configurationContext != null &&
-                configurationContext != ListenerManager.configurationContext) {
-            throw new AxisFault(
-                    "Only One ConfigurationContext Instance we support at the Client Side");
+        // If this config context is in the map, that means we already have a listener for that
+        // config context
+        HashMap listeners = (HashMap) configurationContextMap.get(configurationContext);
+        if (listeners == null) {
+            listeners = new HashMap();
+            configurationContextMap.put(configurationContext, listeners);
+        } else {
+            TransportListenerState tsState = (TransportListenerState) listeners.get(transport);
+            if (tsState != null) {
+                tsState.waitingCalls++;
+                return;
+            }
         }
 
-        ListenerManager.configurationContext = configurationContext;
-        TransportListenerState tsState = (TransportListenerState) listeners.get(
-                transport);
-        if (tsState == null) {
-            //means this transport not yet started, start the transport
-            TransportInDescription tranportIn =
-                    configurationContext.getAxisConfiguration().getTransportIn(
-                            new QName(transport));
-            TransportListener listener = tranportIn.getReceiver();
-            listener.start();
-            tsState = new TransportListenerState(listener);
-            listeners.put(transport, tsState);
-        }
+        //means this transport not yet started, start the transport
+        TransportInDescription tranportIn =
+                configurationContext.getAxisConfiguration().getTransportIn(
+                        new QName(transport));
+        TransportListener listener = tranportIn.getReceiver();
+        listener.start();
+        TransportListenerState tsState = new TransportListenerState(listener);
+        listeners.put(transport, tsState);
+
         tsState.waitingCalls++;
     }
 
-    public static synchronized final void stop(String transport) throws AxisFault {
-        TransportListenerState tsState = (TransportListenerState) listeners.get(
-                transport);
-        if (tsState != null) {
-            tsState.waitingCalls--;
-            if (tsState.waitingCalls == 0) {
-                tsState.listener.stop();
-                //todo I have to properly handle this.
-                listeners.remove(transport);
+    public static synchronized final void stop(ConfigurationContext configurationContext, String transport) throws AxisFault {
+        HashMap listeners = (HashMap) configurationContextMap.get(configurationContext);
+
+        if (listeners != null) {
+            TransportListenerState tsState = (TransportListenerState) listeners.get(transport);
+            if (tsState != null) {
+                tsState.waitingCalls--;
+                if (tsState.waitingCalls == 0) {
+                    tsState.listener.stop();
+                    listeners.remove(transport);
+                }
             }
         }
     }
 
     /**
-     * Returns the replyTo endpoint reference for the servicename/transport combination. 
-     * 
+     * Returns the replyTo endpoint reference for the servicename/transport combination.
+     *
      * @param serviceName
      * @param transport
      * @return endpoint reference
      * @throws AxisFault
      */
-    public static EndpointReference replyToEPR(String serviceName,
+    public static EndpointReference replyToEPR(ConfigurationContext configurationContext,
+                                               String serviceName,
                                                String transport)
             throws AxisFault {
-        TransportListenerState tsState = (TransportListenerState) listeners.get(
-                transport);
-        if (tsState != null) {
-            return tsState.listener.getReplyToEPR(serviceName);
+        HashMap listeners = (HashMap) configurationContextMap.get(configurationContext);
+        if (listeners != null) {
+            TransportListenerState tsState = (TransportListenerState) listeners.get(
+                    transport);
+            if (tsState != null) {
+                return tsState.listener.getReplyToEPR(serviceName);
+            } else {
+                throw new AxisFault(Messages.getMessage("replyNeedStarting", transport));
+            }
         } else {
-            throw new AxisFault(Messages.getMessage("replyNeedStarting",transport));
+            throw new AxisFault("Can not find listeners for " + transport + " for the given config" +
+                    " context " + configurationContext + ". So can not provide a replyTo epr here. ");
         }
-
     }
 
-    public int getPort() {
-        port++;
-        return port;
-    }
     /**
      * This class keeps information about the listener for a given transport.
      */
@@ -127,7 +136,7 @@
             try {
                 return new ServerSocket(port + i);
             } catch (IOException e) {
-              throw new AxisFault("Cannot open a server socket in port "+port + 1, e);
+                // What I'm gonna do here. Try again. 
             }
         }
         throw new AxisFault(Messages.getMessage("failedToOpenSocket"));

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java Fri Nov 25 07:13:04 2005
@@ -19,9 +19,13 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.MessageInformationHeaders;
+import org.apache.axis2.addressing.RelatesTo;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.i18n.Messages;
@@ -45,7 +49,6 @@
     protected final String mep;
     protected String soapVersionURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
     protected String soapAction = "";
-    protected String wsaAction;
 
     protected MessageInformationHeaders messageInformationHeaders = new MessageInformationHeaders();
 
@@ -59,11 +62,6 @@
     */
     protected boolean isExceptionToBeThrownOnSOAPFault = true;
 
-
-    public String getSoapAction() {
-        return soapAction;
-    }
-
     public MEPClient(ServiceContext service, String mep) {
         this.serviceContext = service;
         this.mep = mep;
@@ -104,7 +102,7 @@
         addUserAddedSOAPHeaders(msgCtx);
     }
 
-    private void addUserAddedSOAPHeaders(MessageContext msgCtx) {
+    protected void addUserAddedSOAPHeaders(MessageContext msgCtx) {
         if (soapHeaderList != null && soapHeaderList.size() > 0 && msgCtx.getEnvelope() != null) {
             SOAPFactory soapFactory;
             SOAPHeader header = msgCtx.getEnvelope().getHeader();
@@ -144,7 +142,7 @@
 
     /**
      * Infers the transport by looking at the URL. The URL can be http://
-     * tcp:// mail:// local://. 
+     * tcp:// mail:// local://.
      *
      * @param epr
      * @return
@@ -213,6 +211,7 @@
         messageInformationHeaders.setTo(this.messageInformationHeaders.getTo());
         return messageInformationHeaders;
     }
+
     /**
      * @param string
      */
@@ -231,17 +230,17 @@
      * Setting to configure if an exception is to be thrown when the SOAP message has a fault.
      * If set to true, system throws an exeption with the details extracted from the fault message.
      * Else the response message is returned to the application, irrespective of whether it has a Fault or not.
-     * 
-     * @param exceptionToBeThrownOnSOAPFault 
+     *
+     * @param exceptionToBeThrownOnSOAPFault
      */
     public void setExceptionToBeThrownOnSOAPFault(boolean exceptionToBeThrownOnSOAPFault) {
         isExceptionToBeThrownOnSOAPFault = exceptionToBeThrownOnSOAPFault;
     }
 
     /**
-     * Allows users to add their own headers to the out going message from the client. It is 
-     * restrictive, in the sense, that user can set a 
-     * header with only one text. <code><pre>&lt;HeaderBlockName&gt;your text&lt;/HeaderBlockName&gt;</pre></code>. A more flexible 
+     * Allows users to add their own headers to the out going message from the client. It is
+     * restrictive, in the sense, that user can set a
+     * header with only one text. <code><pre>&lt;HeaderBlockName&gt;your text&lt;/HeaderBlockName&gt;</pre></code>. A more flexible
      * way is to use addSOAPHeader(OMElement).
      *
      * @param soapHeaderQName
@@ -258,6 +257,7 @@
 
     /**
      * Allows users to add a SOAP header block.
+     *
      * @param soapHeaderBlock
      */
     public void addSOAPHeader(OMElement soapHeaderBlock) {
@@ -274,6 +274,7 @@
     //==============================================================================
     // Use these methods to set Addressing specific information to the SOAP envelope.
     //===============================================================================
+
     /**
      * @param action
      */
@@ -305,7 +306,7 @@
     /**
      * @param relatesTo
      */
-    public void setRelatesTo(org.apache.axis2.addressing.RelatesTo relatesTo) {
+    public void setRelatesTo(RelatesTo relatesTo) {
         messageInformationHeaders.setRelatesTo(relatesTo);
     }
 
@@ -324,6 +325,11 @@
     }
 
     // ==============================================================================
+    //  Getteres and Setters
+    // ==============================================================================
+    public String getSoapAction() {
+        return soapAction;
+    }
 
 
     private SOAPFactory getCorrectSOAPFactory(MessageContext msgCtx) {
@@ -341,5 +347,26 @@
 
     public ServiceContext getServiceContext() {
         return serviceContext;
+    }
+
+    /**
+     * Assumes the values for the ConfigurationContext and ServiceContext to make the NON WSDL cases simple.
+     *
+     * @throws org.apache.axis2.AxisFault
+     */
+    protected void assumeServiceContext(String clientHome)
+            throws AxisFault {
+        ConfigurationContext configurationContext =
+                new ConfigurationContextFactory().buildClientConfigurationContext(clientHome);
+
+        QName assumedServiceName = new QName("AnonymousService");
+        AxisService axisService = configurationContext.getAxisConfiguration().getService("AnonymousService");
+        if (axisService == null) {
+            //we will assume a Service and operations
+            axisService = new AxisService(assumedServiceName);
+        }
+        configurationContext.getAxisConfiguration().addService(axisService);
+        serviceContext = axisService.getParent().getServiceGroupContext(configurationContext).getServiceContext(
+                assumedServiceName.getLocalPart());
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MessageSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MessageSender.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MessageSender.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MessageSender.java Fri Nov 25 07:13:04 2005
@@ -17,17 +17,14 @@
 package org.apache.axis2.client;
 
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.deployment.util.PhasesInfo;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisOperationFactory;
 import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.OutInAxisOperation;
 import org.apache.axis2.description.OutOnlyAxisOperation;
+import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisConfigurationImpl;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.soap.SOAPEnvelope;
@@ -52,18 +49,19 @@
     }
 
     public MessageSender() throws AxisFault {
-        super(assumeServiceContext(null));
+       this((String) null);
     }
 
     /**
      * Constructs a Message Sender from a specified repository.
      *
-     * @param repo repository location
+     * @param clientHome repository location
      * @throws AxisFault
      */
 
-    public MessageSender(String repo) throws AxisFault {
-        super(assumeServiceContext(repo));
+    public MessageSender(String clientHome) throws AxisFault {
+        super(null);
+        assumeServiceContext(clientHome);
     }
 
     /**
@@ -83,7 +81,7 @@
     }
 
     public void send(String opName, SOAPEnvelope soapEnvelope) throws AxisFault {
-        if(soapEnvelope == null){
+        if (soapEnvelope == null) {
             throw new AxisFault("Can not send null SOAP envelope");
         }
 
@@ -115,35 +113,20 @@
     /**
      * create a default service Context if the users are not interested in the lower levels of control
      *
-     * @return
      * @throws AxisFault
      */
-    private static ServiceContext assumeServiceContext(String repo) throws AxisFault {
-        ConfigurationContext sysContext = null;
-        if (ListenerManager.configurationContext == null) {
-            ConfigurationContextFactory efac = new ConfigurationContextFactory();
-            sysContext = efac.buildClientConfigurationContext(repo);
-        } else {
-            sysContext = ListenerManager.configurationContext;
-        }
-
-        //create new service
-        QName assumedServiceName = new QName("AnonymousService");
-        AxisService axisService = new AxisService(assumedServiceName);
-
-        //we will assume a Service and operations
-//        axisOperationTemplate = new AxisOperation(new QName("TemplateOperation"));
-        axisOperationTemplate = new OutInAxisOperation(new QName("TemplateOperation"));
+    protected void assumeServiceContext(String clientHome) throws AxisFault {
+        super.assumeServiceContext(clientHome);
+        axisOperationTemplate = new OutOnlyAxisOperation(new QName("TemplateOperation"));
+        AxisService axisService = serviceContext.getAxisService();
 
-        PhasesInfo info = ((AxisConfigurationImpl) sysContext.getAxisConfiguration()).getPhasesinfo();
+        AxisConfiguration axisConfiguration = serviceContext.getConfigurationContext().getAxisConfiguration();
+        PhasesInfo info = ((AxisConfigurationImpl) axisConfiguration).getPhasesinfo();
         //to set the operation flows
         if (info != null) {
             info.setOperationPhases(axisOperationTemplate);
         }
         axisService.addOperation(axisOperationTemplate);
-        sysContext.getAxisConfiguration().addService(axisService);
-        ServiceGroupContext serviceGroupContext = axisService.getParent().getServiceGroupContext(sysContext);
-        return serviceGroupContext.getServiceContext(assumedServiceName.getLocalPart());
     }
 
     public Object get(String key) {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java Fri Nov 25 07:13:04 2005
@@ -511,6 +511,7 @@
                                 de.printStackTrace(error_ptintWriter);
                                 serviceStatus = "Error:\n" +
                                         errorWriter.toString();
+                                de.printStackTrace();
                             } catch (AxisFault axisFault) {
                                 log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE,
                                         currentArchiveFile.getName(), axisFault.getMessage()));

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java Fri Nov 25 07:13:04 2005
@@ -591,4 +591,6 @@
     public void setWsamappingList(ArrayList wsamappingList) {
         this.wsamappingList = wsamappingList;
     }
+
+    
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Fri Nov 25 07:13:04 2005
@@ -57,7 +57,7 @@
  */
 public class AxisService
         //    extends WSDLServiceImpl
-        implements WSDLService ,
+        implements WSDLService,
         ParameterInclude,
         FlowInclude,
         DescriptionConstants {
@@ -66,12 +66,12 @@
 
     private HashMap moduleConfigmap;
 
-    private  AxisServiceGroup parent;
+    private AxisServiceGroup parent;
     //to store the wsdl definition , which is build at the deployment time
 
     //to keep the time that last update time of the service
-    private long lastupdate ;
-    private String  axisServiceName ;
+    private long lastupdate;
+    private String axisServiceName;
     private String fileName = "";
 
     private WSDLServiceImpl serviceimpl = null;
@@ -82,12 +82,11 @@
     private ArrayList mdoulesList = new ArrayList();
 
 
-
     /**
      * Constructor AxisService
      */
 
-    public AxisService(WSDLServiceImpl serviceimpl){
+    public AxisService(WSDLServiceImpl serviceimpl) {
         this.serviceimpl = serviceimpl;
         this.wasaction_opeartionmap = new HashMap();
         this.setComponentProperty(MODULEREF_KEY, new ArrayList());
@@ -167,7 +166,7 @@
             ArrayList wsamappings = axisOperation.getWsamappingList();
             for (int j = 0; j < wsamappings.size(); j++) {
                 Parameter paramter = (Parameter) wsamappings.get(j);
-                this.addMapping((String)paramter.getValue(),axisOperation);
+                this.addMapping((String) paramter.getValue(), axisOperation);
             }
             pr.buildModuleOperation(axisOperation);
             this.addOperation(axisOperation);
@@ -206,15 +205,15 @@
      * Method getOperation
      *
      * @param operationName
-     * @return   AxisOperation
+     * @return AxisOperation
      */
     public AxisOperation getOperation(QName operationName) {
         String opStr = operationName.getLocalPart();
 
         HashMap allOperations = this.getServiceInterface().getAllOperations();
         AxisOperation opeartion = (AxisOperation) allOperations.get(opStr);
-        if(opeartion == null ){
-            opeartion = (AxisOperation)wasaction_opeartionmap.get(
+        if (opeartion == null) {
+            opeartion = (AxisOperation) wasaction_opeartionmap.get(
                     operationName.getLocalPart());
         }
         return opeartion;
@@ -222,12 +221,13 @@
 
     /**
      * To get the WSDL opeartion element in servic einterface
-     * @param operationName  <code>QName</cde>
-     * @return  WSDLOperation <code>WSDLOperation</code>
+     *
+     * @param operationName <code>QName</cde>
+     * @return WSDLOperation <code>WSDLOperation</code>
      */
-    public WSDLOperation getWSDLOPOperation(QName operationName){
+    public WSDLOperation getWSDLOPOperation(QName operationName) {
         String opStr = operationName.getLocalPart();
-        return this.getServiceInterface().getOperation(opStr) ;
+        return this.getServiceInterface().getOperation(opStr);
     }
 
     /*
@@ -241,8 +241,22 @@
      *
      * @param axisOperation
      */
-    public void addOperation(AxisOperation axisOperation) {
+    public void addOperation(AxisOperation axisOperation) throws AxisFault {
         axisOperation.setParent(this);
+        //todo phase resolving and module engagement :
+//        Iterator modules = getEngagedModules().iterator();
+//        while (modules.hasNext()) {
+//            ModuleDescription module = (ModuleDescription) modules.next();
+//            axisOperation.engageModule(module);
+//        }
+        AxisServiceGroup parent = getParent();
+        if (parent != null) {
+            AxisConfiguration axisConfig = parent.getParent();
+            if (axisConfig != null) {
+                PhaseResolver pr = new PhaseResolver(axisConfig,this);
+                pr.buildModuleOperation(axisOperation);
+            }
+        }
         this.getServiceInterface().setOperation(axisOperation);
     }
 
@@ -272,7 +286,7 @@
     /**
      * Method getClassLoader
      *
-     * @return  ClassLoader
+     * @return ClassLoader
      */
     public ClassLoader getClassLoader() {
         return (ClassLoader) this.getComponentProperty(CLASSLOADER_KEY);
@@ -304,7 +318,7 @@
     /**
      * Method getContextPath
      *
-     * @return  String
+     * @return String
      */
     public String getContextPath() {
         return (String) this.getComponentProperty(CONTEXTPATH_KEY);
@@ -365,9 +379,9 @@
             return;
         }
 
-        if(isParameterLocked(param.getName())){
+        if (isParameterLocked(param.getName())) {
             throw new AxisFault("Parmter is locked can not overide: " + param.getName());
-        } else{
+        } else {
             ParameterIncludeImpl paramInclude =
                     (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY);
             paramInclude.addParameter(param);
@@ -395,7 +409,7 @@
     public ArrayList getParameters() {
         ParameterIncludeImpl paramInclude =
                 (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY);
-        return  paramInclude.getParameters();
+        return paramInclude.getParameters();
     }
 
     /*
@@ -507,7 +521,7 @@
     /**
      * Method getOperations
      *
-     * @return  HashMap
+     * @return HashMap
      */
     public HashMap getOperations() {
         return this.getServiceInterface().getOperations();
@@ -531,7 +545,7 @@
      *         otherwise will return null.
      */
     public AxisOperation getOperationBySOAPAction(String soapAction) {
-        if(soapAction == null || soapAction.equals("")){
+        if (soapAction == null || soapAction.equals("")) {
             return null;
         }
         Iterator iterator = this.getEndpoints().keySet().iterator();
@@ -574,7 +588,7 @@
                     .iterator();
             while (extIterator.hasNext()) {
                 WSDLExtensibilityElement element = (WSDLExtensibilityElement) extIterator.next();
-                if (ExtensionConstants.SOAP_11_OPERATION.equals(element.getType())||
+                if (ExtensionConstants.SOAP_11_OPERATION.equals(element.getType()) ||
                         ExtensionConstants.SOAP_12_OPERATION.equals(element.getType())) {
                     if (((SOAPOperation) element).getSoapAction().equals(
                             soapAction)) {
@@ -600,7 +614,7 @@
      * EngineContext's ServiceContextMap.
      *
      * @param msgContext
-     * @return  ServiceContext
+     * @return ServiceContext
      */
     public ServiceContext u(MessageContext msgContext) {
         // TODO : Fix me. Can't look up a service context in the system context
@@ -624,7 +638,8 @@
 
     /**
      * To get the description about the service
-     *                                                                   ty67tyuio
+     * ty67tyuio
+     *
      * @return String
      */
     public String getAxisServiceName() {
@@ -652,11 +667,11 @@
         try {
             Definition wsdlDefinition = this.getWSDLDefinition();
             if (wsdlDefinition != null) {
-                Collection services =  wsdlDefinition.getServices().values();
+                Collection services = wsdlDefinition.getServices().values();
 
                 for (Iterator iterator = services.iterator(); iterator.hasNext();) {
                     Service service = (Service) iterator.next();
-                    Collection ports =  service.getPorts().values();
+                    Collection ports = service.getPorts().values();
                     for (Iterator iterator1 = ports.iterator(); iterator1.hasNext();) {
                         Port port = (Port) iterator1.next();
                         service.setQName(this.getName());
@@ -689,11 +704,11 @@
     /**
      * This method will set the current time as last update time of the service
      */
-    public void setLastupdate(){
+    public void setLastupdate() {
         lastupdate = new Date().getTime();
     }
 
-    public long getLastupdate(){
+    public long getLastupdate() {
         return lastupdate;
     }
 
@@ -713,7 +728,7 @@
         serviceimpl.setEndpoints(endpoints);
     }
 
-    public void setEndpoint(WSDLEndpoint endpoint){
+    public void setEndpoint(WSDLEndpoint endpoint) {
         serviceimpl.setEndpoint(endpoint);
     }
 
@@ -750,7 +765,7 @@
     }
 
     public void setComponentProperty(Object key, Object obj) {
-        serviceimpl.setComponentProperty(key,obj);
+        serviceimpl.setComponentProperty(key, obj);
     }
 
     public Object getComponentProperty(Object key) {
@@ -784,12 +799,13 @@
     /**
      * To add the was action paramater into has map so that was action based dispatch can support
      */
-    public void addMapping(String mappingKey , AxisOperation axisOperation){
-        wasaction_opeartionmap.put(mappingKey,axisOperation);
+    public void addMapping(String mappingKey, AxisOperation axisOperation) {
+        wasaction_opeartionmap.put(mappingKey, axisOperation);
     }
 
     /**
      * To get the parent (which is AxisConfiguration in this case)
+     *
      * @return <code>AxisConfiguration</code>
      */
     public AxisServiceGroup getParent() {
@@ -805,10 +821,10 @@
         // checking the locked value of parent
         boolean loscked = false;
 
-        if (getParent() !=null) {
-            loscked =  getParent().getAxisDescription().isParameterLocked(paramterName);
+        if (getParent() != null) {
+            loscked = getParent().getAxisDescription().isParameterLocked(paramterName);
         }
-        if(loscked){
+        if (loscked) {
             return true;
         } else {
             Parameter parameter = getParameter(paramterName);
@@ -818,22 +834,23 @@
 
     /**
      * Adding module configuration , if there is moduleConfig tag in service
+     *
      * @param moduleConfiguration
      */
-    public void addModuleConfig(ModuleConfiguration moduleConfiguration){
-        moduleConfigmap.put(moduleConfiguration.getModuleName(),moduleConfiguration);
+    public void addModuleConfig(ModuleConfiguration moduleConfiguration) {
+        moduleConfigmap.put(moduleConfiguration.getModuleName(), moduleConfiguration);
     }
 
-    public ModuleConfiguration getModuleConfig(QName moduleName){
-        return  (ModuleConfiguration)moduleConfigmap.get(moduleName);
+    public ModuleConfiguration getModuleConfig(QName moduleName) {
+        return (ModuleConfiguration) moduleConfigmap.get(moduleName);
     }
 
 
-    public void addModuleref(QName moduleref){
+    public void addModuleref(QName moduleref) {
         mdoulesList.add(moduleref);
     }
 
-    public ArrayList getModules(){
+    public ArrayList getModules() {
         return mdoulesList;
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java Fri Nov 25 07:13:04 2005
@@ -20,15 +20,7 @@
 import org.apache.axis2.deployment.DeploymentEngine;
 import org.apache.axis2.deployment.repository.util.ArchiveReader;
 import org.apache.axis2.deployment.util.PhasesInfo;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.ModuleConfiguration;
-import org.apache.axis2.description.ModuleDescription;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.ParameterInclude;
-import org.apache.axis2.description.ParameterIncludeImpl;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.phaseresolver.PhaseMetadata;
 import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.axis2.util.HostConfiguration;
@@ -445,7 +437,7 @@
     public void engageModule(QName moduleref) throws AxisFault {
         ModuleDescription module = getModule(moduleref);
         boolean isNewmodule = false;
-        boolean tobeEnaged = true;
+        boolean tobeEngaged = true;
         if (module == null) {
             File file = new ArchiveReader().creatModuleArchivefromResource(
                     moduleref.getLocalPart(), getRepository());
@@ -457,7 +449,7 @@
                  iterator.hasNext();) {
                 QName qName = (QName) iterator.next();
                 if (moduleref.equals(qName)) {
-                    tobeEnaged = false;
+                    tobeEngaged = false;
                     //Instead of throwing the error, we can just log this problem
                     log.info("Attempt to engage an already engaged module "+ qName);
                 }
@@ -468,7 +460,7 @@
                             + moduleref.getLocalPart() +
                             " has not bean deployed yet !");
         }
-        if (tobeEnaged) {
+        if (tobeEngaged) {
             new PhaseResolver(this).engageModuleGlobally(module);
             engagedModules.add(moduleref);
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java Fri Nov 25 07:13:04 2005
@@ -94,7 +94,7 @@
         for (Iterator iterator = col.iterator(); iterator.hasNext();) {
             AxisOperation axisOperation = (AxisOperation) iterator.next();
             for (int i = 1; i < 5; i++) {
-                buildExcutionChains(i, axisOperation);
+                buildExecutionChains(i, axisOperation);
             }
         }
         ArrayList modulqnames = (ArrayList) ((AxisConfigurationImpl) axisConfig).getEngadgedModules();
@@ -108,12 +108,12 @@
     /**
      * To build the opration for the opeartion which the module going to be added
      *
-     * @param opartion <code>AxisOperation</code>
+     * @param operation <code>AxisOperation</code>
      * @throws AxisFault
      */
-    public void buildModuleOperation(AxisOperation opartion) throws AxisFault {
+    public void buildModuleOperation(AxisOperation operation) throws AxisFault {
         for (int i = 1; i < 5; i++) {
-            buildExcutionChains(i, opartion);
+            buildExecutionChains(i, operation);
         }
     }
 
@@ -128,7 +128,7 @@
      * @throws AxisFault
      * @throws PhaseException
      */
-    private void buildExcutionChains(int type, AxisOperation axisOperation)
+    private void buildExecutionChains(int type, AxisOperation axisOperation)
             throws AxisFault, PhaseException {
         ArrayList allHandlers = new ArrayList();
         ModuleDescription module;

Modified: webservices/axis2/trunk/java/modules/core/test-resources/deployment/service1/META-INF/services.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test-resources/deployment/service1/META-INF/services.xml?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test-resources/deployment/service1/META-INF/services.xml (original)
+++ webservices/axis2/trunk/java/modules/core/test-resources/deployment/service1/META-INF/services.xml Fri Nov 25 07:13:04 2005
@@ -4,22 +4,6 @@
         This is a testing service , to test the system is working or not
     </description>
     <parameter name="ServiceClass" locked="false">org.apache.axis2.sample.echo.EchoImpl</parameter>
-    <inflow>
-        <handler name="logging" class="org.apache.axis2.sample.handlers.LoggingHandler">
-            <order phase="userphase1" phaseFirst="true"/>
-        </handler>
-    </inflow>
-    <outflow/>
-    <INfaultflow>
-        <handler name="logging2" class="org.apache.axis2.sample.handlers.LoggingHandler">
-            <order phase="userphase1"/>
-        </handler>
-    </INfaultflow>
-    <Outfaultflow>
-        <handler name="logging2" class="org.apache.axis2.sample.handlers.LoggingHandler">
-            <order phase="userphase1"/>
-        </handler>
-    </Outfaultflow>
     <operation name="echoString">
         <module ref="module1"/>
         <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

Modified: webservices/axis2/trunk/java/modules/core/test-resources/deployment/service2/META-INF/services.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test-resources/deployment/service2/META-INF/services.xml?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test-resources/deployment/service2/META-INF/services.xml (original)
+++ webservices/axis2/trunk/java/modules/core/test-resources/deployment/service2/META-INF/services.xml Fri Nov 25 07:13:04 2005
@@ -6,47 +6,6 @@
         This is a testing service , to test the system is working or not
     </description>
 
-    <!--  Service TypeMapping -->
-
-    <!--
-    Phases
-    P1 p2 p3
-    -->
-
-    <inflow>
-        <handler name="h1" class="org.apache.axis2.handlers.Handler2">
-            <order phase="userphase1" phaseFirst="true"/>
-        </handler>
-    </inflow>
-
-    <outflow>
-        <handler name="h3" class="org.apache.axis2.handlers.Handler2">
-            <order phase="userphase1"/>
-        </handler>
-    </outflow>
-
-    <INfaultflow>
-        <handler name="h5" class="org.apache.axis2.handlers.Handler2">
-            <order phase="userphase1"/>
-        </handler>
-
-        <handler name="h6" class="org.apache.axis2.handlers.Handler2">
-            <order phase="userphase1" phaseLast="false"/>
-        </handler>
-    </INfaultflow>
-    <Outfaultflow>
-        <handler name="h4" class="org.apache.axis2.handlers.Handler2">
-            <order phase="userphase1"/>
-        </handler>
-
-        <handler name="h5" class="org.apache.axis2.handlers.Handler2">
-            <order phase="userphase1"/>
-        </handler>
-
-        <handler name="h6" class="org.apache.axis2.handlers.Handler2">
-            <order phase="userphase1" phaseLast="false"/>
-        </handler>
-    </Outfaultflow>
     <operation name="opname">
         <module ref="module1"></module>
     </operation>

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java Fri Nov 25 07:13:04 2005
@@ -33,36 +33,40 @@
         super(testName);
     }
 
-    public void testDeployment() throws Exception {
-        String filename = "./target/test-resources/deployment";
-        ConfigurationContextFactory builder = new ConfigurationContextFactory();
-        AxisConfiguration er = builder.buildConfigurationContext(filename)
-                .getAxisConfiguration();
+    public void testDeployment() {
+        try {
+            String filename = "./target/test-resources/deployment";
+            ConfigurationContextFactory builder = new ConfigurationContextFactory();
+            AxisConfiguration er = builder.buildConfigurationContext(filename)
+                    .getAxisConfiguration();
 
-        assertNotNull(er);
-        AxisService service = er.getService("service2");
-        assertNotNull(service);
-        //commentd since there is no service based messgeReceivers
-        /*MessageReceiver provider = service.getMessageReceiver();
-        assertNotNull(provider);
-        assertTrue(provider instanceof RawXMLINOutMessageReceiver);*/
-        ClassLoader cl = service.getClassLoader();
-        assertNotNull(cl);
-        Class.forName("org.apache.axis2.Echo2", true, cl);
-        assertNotNull(service.getName());
-        //no style for the service
-        //   assertEquals(service.getStyle(),"rpc");
+            assertNotNull(er);
+            AxisService service = er.getService("service2");
+            assertNotNull(service);
+            //commentd since there is no service based messgeReceivers
+            /*MessageReceiver provider = service.getMessageReceiver();
+          assertNotNull(provider);
+          assertTrue(provider instanceof RawXMLINOutMessageReceiver);*/
+            ClassLoader cl = service.getClassLoader();
+            assertNotNull(cl);
+            Class.forName("org.apache.axis2.Echo2", true, cl);
+            assertNotNull(service.getName());
+            //no style for the service
+            //   assertEquals(service.getStyle(),"rpc");
 
-        Flow flow = service.getFaultInFlow();
-        assertTrue(flow.getHandlerCount() > 0);
-        flow = service.getInFlow();
-        assertTrue(flow.getHandlerCount() > 0);
-        flow = service.getOutFlow();
-        assertTrue(flow.getHandlerCount() > 0);
-        assertNotNull(service.getParameter("para2"));
+            Flow flow = service.getFaultInFlow();
+            assertTrue(flow.getHandlerCount() > 0);
+            flow = service.getInFlow();
+            assertTrue(flow.getHandlerCount() > 0);
+            flow = service.getOutFlow();
+            assertTrue(flow.getHandlerCount() > 0);
+            assertNotNull(service.getParameter("para2"));
 
-        AxisOperation op = service.getOperation(new QName("opname"));
-        assertNotNull(op);
+            AxisOperation op = service.getOperation(new QName("opname"));
+            assertNotNull(op);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
 
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/itest/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/itest/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/itest/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/itest/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java Fri Nov 25 07:13:04 2005
@@ -29,10 +29,7 @@
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
 import org.apache.axis2.om.OMNamespace;
-import org.apache.axis2.soap.SOAPFactory;
 import org.apache.axis2.util.Utils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.xml.stream.XMLOutputFactory;
 
@@ -96,6 +93,7 @@
                         payload);
         result.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(
                 System.out));
+
 
         call.close();
     }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java?rev=348964&r1=348963&r2=348964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java Fri Nov 25 07:13:04 2005
@@ -18,7 +18,6 @@
 
 import junit.framework.TestCase;
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.client.ListenerManager;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.ServiceContext;
@@ -53,9 +52,8 @@
     }
 
     public static synchronized void unDeployClientService() throws AxisFault {
-        if(ListenerManager.configurationContext !=null){
-            ListenerManager.configurationContext.getAxisConfiguration()
-                    .removeService("AnonymousService");
+        if(receiver.getSystemContext().getAxisConfiguration() !=null){
+            receiver.getSystemContext().getAxisConfiguration().removeService("AnonymousService");
         }
     }