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 de...@apache.org on 2006/01/18 05:29:43 UTC

svn commit: r370041 [1/3] - in /webservices/axis2/trunk/java/modules: addressing/test/org/apache/axis2/handlers/addressing/ codegen/src/org/apache/axis2/wsdl/template/java/ codegen/test/org/apache/axis2/rpc/ core/conf/ core/src/org/apache/axis2/ core/s...

Author: deepal
Date: Tue Jan 17 20:24:14 2006
New Revision: 370041

URL: http://svn.apache.org/viewcvs?rev=370041&view=rev
Log:
changes Axis2 to support deployment mechanism as described in 
http://marc.theaimsgroup.com/?t=113743106600001&r=1&w=2


So according to that axis2.xml always need not be in repository , it can be in somewhere . I think I dont need to explain everything here the mail explains everything. 

- default_axis2.xml is in core/org.apache.axis2.deployment (which dose not have addressing module engaged)
- and axis2.xml is in core/conf (which has addressing module engaged)

Added:
    webservices/axis2/trunk/java/modules/core/conf/axis2.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/default_axis2.xml   (contents, props changed)
      - copied, changed from r368263, webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml
Removed:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml
Modified:
    webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingModuleTest.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.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/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/SimpleJMSListener.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailServer.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/AddingObserverTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/AxisMessageTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/DeploymentTotalTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/HostCongigurationTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/InvalidServiceTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/ModifiedConfigFileTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/ModuleversionTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/SameServiceAddingTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/ServiceGroupTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/SystemPhasesremovedTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleConfigTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleEngageTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParameterLocked.java
    webservices/axis2/trunk/java/modules/integration/itest/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/itest/test/interop/mtom/MTOMEchoTestMultipleTest.java
    webservices/axis2/trunk/java/modules/integration/itest/test/interop/mtom/MTOMEchoTestSingleTest.java
    webservices/axis2/trunk/java/modules/integration/maven.xml
    webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/round1/Round1Client.java
    webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/round2/SunRound2Client.java
    webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/round3/SunRound3Client.java
    webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/round4/complex/EchoBlockingClient.java
    webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/round4/simple/EchoBlockingClient.java
    webservices/axis2/trunk/java/modules/integration/src/test/soap12testing/server/SimpleServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CallUnregisteredServiceTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CharactersetEncodingTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunkedTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLLoadTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceGroupContextTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/InvokerThread.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/profiling/ContextMemoryHandlingUtil.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/groovy/GroovyServiceTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsJMSServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/jms/JMSEchoRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/UtilsMailServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/UtilServer.java
    webservices/axis2/trunk/java/modules/samples/src/sample/amazon/search/ClientUtil.java
    webservices/axis2/trunk/java/modules/samples/src/sample/security/Client.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/clients/ClientSideModuleEngagement.java
    webservices/axis2/trunk/java/modules/security/interop/org/apache/axis2/security/InteropScenarioClient.java

Modified: webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingModuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingModuleTest.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingModuleTest.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingModuleTest.java Tue Jan 17 20:24:14 2006
@@ -36,7 +36,7 @@
 
     public void testExtractAddressingInformationFromHeaders() throws AxisFault {
         ConfigurationContextFactory builder = new ConfigurationContextFactory();
-        AxisConfiguration er = builder.createConfigurationContextFromFileSystem("target")
+        AxisConfiguration er = builder.createConfigurationContextFromFileSystem("target", null)
                 .getAxisConfiguration();
         File file = new File("target/addressing.mar");
         assertTrue(file.exists());

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=370041&r1=370040&r2=370041&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 Tue Jan 17 20:24:14 2006
@@ -91,7 +91,7 @@
      * Constructor taking the traget endpoint
      */
     public <xsl:value-of select="@name"/>(String targetEndpoint) throws java.lang.Exception {
-        this(new org.apache.axis2.context.ConfigurationContextFactory().createConfigurationContextFromFileSystem(AXIS2_HOME),
+        this(new org.apache.axis2.context.ConfigurationContextFactory().createConfigurationContextFromFileSystem(AXIS2_HOME,null),
                 targetEndpoint);
     }
 

Modified: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java Tue Jan 17 20:24:14 2006
@@ -28,13 +28,7 @@
 import org.apache.axis2.databinding.deserializers.SimpleDeserializerFactory;
 import org.apache.axis2.databinding.serializers.CollectionSerializer;
 import org.apache.axis2.databinding.serializers.SimpleSerializer;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.InOutAxisOperation;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.ParameterImpl;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.receivers.AbstractMessageReceiver;
@@ -175,7 +169,8 @@
     public void testRPC() throws Exception {
 //        Call call = new Call("test-resources/xmls");
         ConfigurationContext configcontext = new ConfigurationContextFactory()
-                .createConfigurationContextFromFileSystem("test-resources/xmls");
+                .createConfigurationContextFromFileSystem("test-resources/xmls",
+                        "test-resources/xmls/axis2.xml");
         ServiceClient client = new ServiceClient(configcontext, null);
 //        Call call = new Call(".");
 

Added: webservices/axis2/trunk/java/modules/core/conf/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/conf/axis2.xml?rev=370041&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/conf/axis2.xml (added)
+++ webservices/axis2/trunk/java/modules/core/conf/axis2.xml Tue Jan 17 20:24:14 2006
@@ -0,0 +1,166 @@
+<axisconfig name="AxisJava2.0">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment" locked="false">true</parameter>
+    <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" locked="false">true</parameter>
+    <!-- Uncomment this to enable REST support -->
+    <!--    <parameter name="enableREST" locked="false">true</parameter>-->
+
+
+    <parameter name="userName" locked="false">admin</parameter>
+    <parameter name="password" locked="false">axis2</parameter>
+
+    <parameter name="seralizeLocation" locked="false">.</parameter>
+    <hostConfiguration>
+        <ip>127.0.0.1</ip>
+        <port>5555</port>
+    </hostConfiguration>
+
+
+    <!--if you want to extract the service archive file and work with that please uncomment this-->
+    <!--else , it wont extract archive file or does not take into consideration if someone drop-->
+    <!--exploded directory into /service directory-->
+    <!--<parameter name="extractServiceArchive" locked="false">true</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovride this for particular service by adding the same element with your requirement-->
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port" locked="false">6060</parameter>
+    </transportReceiver>
+
+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>
+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>
+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>
+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>
+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>
+      </transportReceiver> -->
+
+    <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port" locked="false">6060</parameter>
+    </transportReceiver>
+
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.SimpleJMSListener">
+        <parameter name="transport.jms.Destination" locked="false">dynamicQueues/FOO</parameter>
+        <parameter name="java.naming.factory.initial" locked="false">
+            org.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+        <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
+    </transportReceiver>
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+
+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
+   <transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>
+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>
+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>
+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>
+   </transportSender>
+   -->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="inflow">
+        <!--  System pre defined phases       -->
+        <phase name="TransportIn"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
+        <!--  System pre defined phases       -->
+        <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
+        <phase name="userphase1"/>
+    </phaseOrder>
+    <phaseOrder type="outflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+    <phaseOrder type="INfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+    </phaseOrder>
+    <phaseOrder type="Outfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+</axisconfig>
+

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Tue Jan 17 20:24:14 2006
@@ -76,6 +76,7 @@
     public static final String SCOPE_REQUEST = "request";
 
     public static final String HOME_AXIS2 = "axis2.home";
+    public static final String CONF_AXIS2 = "axis2.conf";
     public static final String HOME_USER = "user.home";
 
     /**

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=370041&r1=370040&r2=370041&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 Tue Jan 17 20:24:14 2006
@@ -19,11 +19,7 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
-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.context.*;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisServiceGroup;
@@ -32,11 +28,7 @@
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
-import org.apache.axis2.soap.SOAP11Constants;
-import org.apache.axis2.soap.SOAP12Constants;
-import org.apache.axis2.soap.SOAPEnvelope;
-import org.apache.axis2.soap.SOAPFactory;
-import org.apache.axis2.soap.SOAPHeader;
+import org.apache.axis2.soap.*;
 import org.apache.axis2.util.UUIDGenerator;
 
 import javax.xml.namespace.QName;
@@ -45,8 +37,9 @@
 
 /**
  * This is the super class for all MEPClients.
- * @deprecated
+ *
  * @see OperationClient
+ * @deprecated
  */
 public abstract class MEPClient {
     private static final String ANONYMOUS_SERVICE = "AnonymousService";
@@ -94,7 +87,7 @@
      */
     public void addSOAPHeader(QName soapHeaderQName, String soapHeaderText) {
         OMElement omElement = OMAbstractFactory.getOMFactory().createOMElement(soapHeaderQName,
-                                                                               null);
+                null);
 
         omElement.setText(soapHeaderText);
 
@@ -107,7 +100,7 @@
 
     protected void addUserAddedSOAPHeaders(MessageContext msgCtx, Options options) {
         if ((soapHeaderList != null) && (soapHeaderList.size() > 0)
-            && (msgCtx.getEnvelope() != null)) {
+                && (msgCtx.getEnvelope() != null)) {
             SOAPFactory soapFactory;
             SOAPHeader header = msgCtx.getEnvelope().getHeader();
 
@@ -136,7 +129,7 @@
      */
     protected void assumeServiceContext(String clientHome) throws AxisFault {
         ConfigurationContext configurationContext =
-                new ConfigurationContextFactory().createConfigurationContextFromFileSystem(clientHome);
+                new ConfigurationContextFactory().createConfigurationContextFromFileSystem(clientHome, null);
         AxisService axisService =
                 configurationContext.getAxisConfiguration().getService(ANONYMOUS_SERVICE);
 
@@ -148,7 +141,7 @@
 
         configurationContext.getAxisConfiguration().addService(axisService);
         serviceContext = new ServiceGroupContext(configurationContext,
-                                                 (AxisServiceGroup) axisService.getParent()).getServiceContext(axisService);
+                (AxisServiceGroup) axisService.getParent()).getServiceContext(axisService);
     }
 
     /**
@@ -173,7 +166,7 @@
         if (clientOptions == null) {
             throw new AxisFault(
                     "Can not proceed without options being set for invocation. Set the"
-                    + "properties for this invocation via MEPClient.setOptions(Options) first.");
+                            + "properties for this invocation via MEPClient.setOptions(Options) first.");
         }
 
         String soapVersionURI = clientOptions.getSoapVersionURI();
@@ -286,7 +279,7 @@
 
             if (this.clientOptions.getTranportOut() == null) {
                 throw new AxisFault(Messages.getMessage("unknownTransport",
-                                                        senderTrasportProtocol));
+                        senderTrasportProtocol));
             }
         }
     }
@@ -303,10 +296,10 @@
         // I should check that is
         // available either from the message context or from the options.
         if (((msgCtx == null) || (msgCtx.getTo() == null))
-            && ((clientOptions == null) || (clientOptions.getTo() == null))) {
+                && ((clientOptions == null) || (clientOptions.getTo() == null))) {
             throw new AxisFault(
                     "Can not proceed without options being set for invocation. Set the"
-                    + "properties for this invocation via MEPClient.setOptions(Options) first.");
+                            + "properties for this invocation via MEPClient.setOptions(Options) first.");
         }
 
         if (axisop == null) {
@@ -316,7 +309,7 @@
         // make sure operation is type right MEP
         if (mep.equals(axisop.getMessageExchangePattern())) {
             throw new AxisFault(Messages.getMessage("mepClientSupportOnly", mep,
-                                                    axisop.getMessageExchangePattern()));
+                    axisop.getMessageExchangePattern()));
         }
 
         // if operation not alrady added, add it

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java Tue Jan 17 20:24:14 2006
@@ -3,18 +3,8 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
-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.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.ClientUtils;
-import org.apache.axis2.description.OutInAxisOperation;
-import org.apache.axis2.description.OutOnlyAxisOperation;
-import org.apache.axis2.description.RobustOutOnlyAxisOperation;
+import org.apache.axis2.context.*;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.om.OMAbstractFactory;
@@ -86,7 +76,7 @@
         // create a config context if needed
         this.configContext = (configContext != null) ? configContext
                 : new ConfigurationContextFactory()
-                .createConfigurationContextFromFileSystem(null);
+                .createConfigurationContextFromFileSystem(null, null);
 
         // save the axisConfig and service
         this.axisConfig = this.configContext.getAxisConfiguration();
@@ -125,7 +115,7 @@
         // create a config context if needed
         this.configContext = (configContext != null) ? configContext
                 : new ConfigurationContextFactory()
-                .createConfigurationContextFromFileSystem(null);
+                .createConfigurationContextFromFileSystem(null, null);
         try {
             this.axisConfig = this.configContext.getAxisConfiguration();
             axisService = ClientUtils.creatAxisService(wsdlURL, wsdlServiceName, portName, options);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java Tue Jan 17 20:24:14 2006
@@ -31,14 +31,7 @@
 import org.apache.axis2.wsdl.WSDLVersionWrapper;
 import org.apache.axis2.wsdl.builder.WOMBuilder;
 import org.apache.axis2.wsdl.builder.WOMBuilderFactory;
-import org.apache.wsdl.WSDLBinding;
-import org.apache.wsdl.WSDLBindingOperation;
-import org.apache.wsdl.WSDLConstants;
-import org.apache.wsdl.WSDLDescription;
-import org.apache.wsdl.WSDLEndpoint;
-import org.apache.wsdl.WSDLInterface;
-import org.apache.wsdl.WSDLOperation;
-import org.apache.wsdl.WSDLService;
+import org.apache.wsdl.*;
 import org.apache.wsdl.extensions.SOAPAddress;
 import org.apache.wsdl.extensions.SOAPOperation;
 
@@ -54,7 +47,8 @@
     public WSDLMEPClientBuilder(String clienthome) throws AxisFault {
         try {
             configurationContext =
-                    new ConfigurationContextFactory().createConfigurationContextFromFileSystem(clienthome);
+                    new ConfigurationContextFactory().
+                            createConfigurationContextFromFileSystem(clienthome,null);
         } catch (DeploymentException e) {
             throw new AxisFault(e);
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java Tue Jan 17 20:24:14 2006
@@ -21,11 +21,11 @@
 import java.util.Iterator;
 
 public class ConfigurationContextFactory {
-    
+
     private Log log = LogFactory.getLog(getClass());
 
     /**
-     * Creates a AxisConfiguration depending on the user requirment. 
+     * Creates a AxisConfiguration depending on the user requirment.
      * First creates an AxisConfigurator object with appropriate parameters.
      * Depending on the implementation getAxisConfiguration(), gets
      * the AxisConfiguration and uses it to create the ConfigurationContext.
@@ -43,20 +43,22 @@
     }
 
     /**
-     * Builds the configuration. 
+     * Builds the configuration.
      *
-     * @param path
+     * @param path     : location of the repository
+     * @param axis2xml : location of the axis2.xml (configuration) file
      * @return Returns the built ConfigurationContext.
      * @throws DeploymentException
      */
-    public ConfigurationContext createConfigurationContextFromFileSystem(String path) throws AxisFault {
-        return createConfigurationContext(new FileSystemConfigurator(path, true));
+    public ConfigurationContext createConfigurationContextFromFileSystem(String path,
+                                                                         String axis2xml) throws AxisFault {
+        return createConfigurationContext(new FileSystemConfigurator(path, axis2xml));
     }
 
     /**
      * Initializes modules and creates Transports.
      */
-    
+
     private void init(ConfigurationContext configContext) throws AxisFault {
         try {
             PhaseResolver phaseResolver = new PhaseResolver(configContext.getAxisConfiguration());

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java Tue Jan 17 20:24:14 2006
@@ -77,6 +77,7 @@
 
     String PROPERTY_TEMP_DIR = "java.io.tmpdir";
     String DIRECTORY_MODULES = "modules";
+    String DIRECTORY_CONF = "conf";
     String DIRECTORY_AXIS2_HOME = ".axis2";
     String RESOURCE_MODULES = "modules/";
     String SUFFIX_MAR = ".mar";
@@ -86,16 +87,17 @@
      * Resource that contains the configuration.
      */
     String AXIS2_CONFIGURATION_RESOURCE =
-            "org/apache/axis2/deployment/axis2.xml";
+            "org/apache/axis2/deployment/default_axis2.xml";
+    String AXIS2_REPO = "repository";
     String AXIS2_CONFIGURATION_XML = "axis2.xml";
     String DIRECTORY_SERVICES = "services";
     String BOOLEAN_TRUE = "true";
     String BOOLEAN_FALSE = "false";
     char SEPARATOR_DOT = '.';
     char SEPARATOR_COLON = ':';
-    
+
     String POLICY_NS_URI = "http://schemas.xmlsoap.org/ws/2004/09/policy";
     String TAG_POLICY = "Policy";
     String TAG_POLICY_REF = "PolicyReference";
-    
+
 }

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=370041&r1=370040&r2=370041&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 Tue Jan 17 20:24:14 2006
@@ -28,12 +28,7 @@
 import org.apache.axis2.deployment.scheduler.SchedulerTask;
 import org.apache.axis2.deployment.util.PhasesInfo;
 import org.apache.axis2.deployment.util.Utils;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.Flow;
-import org.apache.axis2.description.ModuleDescription;
-import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Phase;
 import org.apache.axis2.i18n.Messages;
@@ -44,19 +39,8 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
+import java.io.*;
+import java.util.*;
 
 public class DeploymentEngine implements DeploymentConstants {
 
@@ -64,6 +48,7 @@
     private boolean hotUpdate = true;    // to do hot update or not
     private boolean hotDeployment = true;    // to do hot deployment or not
     public String axis2repository = null;
+    private boolean useDefault = false;
 
     /**
      * Stores all the web Services to deploy.
@@ -88,7 +73,7 @@
      */
     private AxisConfiguration axisConfig;
     private ArchiveFileData currentArchiveFile;
-    private String engineConfigName;
+    private String axis2_xml_file_name;
 
 
     /**
@@ -97,25 +82,34 @@
     public DeploymentEngine() {
     }
 
-    /**
-     * This constructor is used by Engine to start the deployment module.
-     *
-     * @param repositoryName is the path to which Repository Listener should
-     *                       listen to.
-     */
-    public DeploymentEngine(String repositoryName) throws DeploymentException {
-        this(repositoryName, AXIS2_CONFIGURATION_XML);
-    }
-
     public DeploymentEngine(String repositoryName, String xmlFile)
             throws DeploymentException {
-        if ((repositoryName == null) || "".equals(repositoryName.trim())) {
-            throw new DeploymentException(
-                    Messages.getMessage(DeploymentErrorMsgs.REPOSITORY_CANNOT_BE_NULL));
-        }
-        axis2repository = repositoryName;
-        prepareRepository(repositoryName, xmlFile);
-        this.engineConfigName = repositoryName + '/' + xmlFile;
+        if ((repositoryName == null || "".equals(repositoryName.trim())) &&
+                (xmlFile == null || "".equals(xmlFile.trim()))) {
+            axis2repository = repositoryName;
+            axis2_xml_file_name = xmlFile;
+
+            useDefault = true;
+            axis2repository = null;
+            log.info("nither repository location nor aixs2.xml are given ," +
+                    " so system will continue using default configuration (using default_axis2.xml)");
+        } else if (!(repositoryName == null || "".equals(repositoryName.trim()))) {
+            axis2repository = repositoryName.trim();
+            File axisRepo = new File(axis2repository);
+            if (!axisRepo.exists()) {
+                throw new DeploymentException("System can not find the given repository location: "
+                        + axis2repository);
+            }
+            if (xmlFile == null || "".equals(xmlFile.trim())) {
+                axis2_xml_file_name = null;
+            } else {
+                axis2_xml_file_name = xmlFile;
+            }
+            prepareRepository(repositoryName);
+        } else if (!(xmlFile == null || "".equals(xmlFile.trim()))) {
+            axis2_xml_file_name = xmlFile;
+            axis2repository = null;
+        }
     }
 
     /**
@@ -269,15 +263,13 @@
             this.setPhasesinfo(config.getPhasesInfo());
             currentArchiveFile = new ArchiveFileData(modulearchive, TYPE_MODULE);
             axismodule = new ModuleDescription();
-            axismodule.setModuleClassLoader(currentArchiveFile.getClassLoader());
-
             ArchiveReader archiveReader = new ArchiveReader();
-            ClassLoader moduleClassLoader = config.getModuleClassLoader();
 
-            currentArchiveFile.setClassLoader(false, moduleClassLoader);
+            currentArchiveFile.setClassLoader(false, config.getModuleClassLoader());
+            axismodule.setModuleClassLoader(currentArchiveFile.getClassLoader());
             archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(), this, axismodule,
                     false, axisConfig);
-
+            ClassLoader moduleClassLoader = axismodule.getModuleClassLoader();
             Flow inflow = axismodule.getInFlow();
 
             if (inflow != null) {
@@ -350,15 +342,6 @@
         return axisService;
     }
 
-    private void checkClientHome(String repositoryName) throws DeploymentException {
-        prepareRepository(repositoryName, AXIS2_CONFIGURATION_XML);
-        this.engineConfigName = repositoryName + '/' + AXIS2_CONFIGURATION_XML;
-    }
-
-    private AxisConfiguration createEngineConfig() {
-        return new AxisConfiguration();
-    }
-
     public void doDeploy() {
         if (wsToDeploy.size() > 0) {
             for (int i = 0; i < wsToDeploy.size(); i++) {
@@ -504,19 +487,26 @@
     }
 
     public AxisConfiguration load() throws DeploymentException {
-        if (engineConfigName == null) {
-            throw new DeploymentException(
-                    Messages.getMessage(DeploymentErrorMsgs.PATH_TO_CONFIG_CANNOT_BE_NULL));
-        }
-
-        File tempfile = new File(engineConfigName);
-        RepositoryListenerImpl repoListener;
-
-        try {
-            InputStream in = new FileInputStream(tempfile);
-
-            axisConfig = createEngineConfig();
-
+        axisConfig = new AxisConfiguration();
+        if (useDefault && axis2repository == null) {
+            ClassLoader cl = Thread.currentThread().getContextClassLoader();
+            InputStream in = cl.getResourceAsStream(AXIS2_CONFIGURATION_RESOURCE);
+            AxisConfigBuilder builder = new AxisConfigBuilder(in, this, axisConfig);
+            builder.populateConfig();
+            axisConfig.setPhasesinfo(phasesinfo);
+            return axisConfig;
+        } else if (axis2repository != null) {
+            InputStream in;
+            if (useDefault) {
+                ClassLoader cl = Thread.currentThread().getContextClassLoader();
+                in = cl.getResourceAsStream(AXIS2_CONFIGURATION_RESOURCE);
+            } else {
+                try {
+                    in = new FileInputStream(axis2_xml_file_name);
+                } catch (FileNotFoundException e) {
+                    throw new DeploymentException(e);
+                }
+            }
             AxisConfigBuilder builder = new AxisConfigBuilder(in, this, axisConfig);
 
             builder.populateConfig();
@@ -524,95 +514,60 @@
 
             // setting the CLs
             setClassLoaders(axis2repository);
-        } catch (FileNotFoundException e) {
-            throw new DeploymentException(e);
-        }
-
-        setDeploymentFeatures();
-        repoListener = new RepositoryListenerImpl(axis2repository, this);
-
-        try {
-            axisConfig.setRepository(axis2repository);
-            validateSystemPredefinedPhases();
-            engageModules();
-        } catch (AxisFault axisFault) {
-            log.info(Messages.getMessage(DeploymentErrorMsgs.MODULE_VALIDATION_FAILED,
-                    axisFault.getMessage()));
-
-            throw new DeploymentException(axisFault);
-        }
-
-        repoListener.checkServices();
-
-        if (hotDeployment) {
-            startSearch(repoListener);
-        }
-
-        return axisConfig;
-    }
-
-    public AxisConfiguration loadClient(String clientHome) throws DeploymentException {
-        InputStream in;
-
-        axis2repository = clientHome;
-
-        boolean isRepositoryExist = false;
-        RepositoryListenerImpl repoListener = null;
-
-        if (!((clientHome == null) || "".equals(clientHome.trim()))) {
-            checkClientHome(clientHome);
-            isRepositoryExist = true;
-
+            setDeploymentFeatures();
+            RepositoryListener repoListener = new RepositoryListenerImpl(axis2repository, this);
             try {
-                File tempfile = new File(engineConfigName);
-
-                in = new FileInputStream(tempfile);
+                axisConfig.setRepository(axis2repository);
+                if (!useDefault) {
+                    validateSystemPredefinedPhases();
+                    engageModules();
+                }
+            } catch (AxisFault axisFault) {
+                log.info(Messages.getMessage(DeploymentErrorMsgs.MODULE_VALIDATION_FAILED,
+                        axisFault.getMessage()));
+                throw new DeploymentException(axisFault);
+            }
+            repoListener.checkServices();
+            if (hotDeployment) {
+                startSearch(repoListener);
+            }
+            return axisConfig;
+        } else {
+            InputStream in;
+            try {
+                in = new FileInputStream(axis2_xml_file_name);
             } catch (FileNotFoundException e) {
                 throw new DeploymentException(e);
             }
-        } else {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-
-            in = cl.getResourceAsStream(AXIS2_CONFIGURATION_RESOURCE);
-
-            if (in == null) {
-                throw new DeploymentException(
-                        Messages.getMessage(DeploymentErrorMsgs.CONFIG_NOT_FOUND));
+            AxisConfigBuilder builder = new AxisConfigBuilder(in, this, axisConfig);
+            builder.populateConfig();
+            axisConfig.setPhasesinfo(phasesinfo);
+            Parameter axis2repoPara = axisConfig.getParameter(AXIS2_REPO);
+            if (axis2repoPara != null) {
+                axis2repository = (String) axis2repoPara.getValue();
+                setClassLoaders(axis2repository);
+                setDeploymentFeatures();
+                RepositoryListener repoListener = new RepositoryListenerImpl(axis2repository, this);
+                try {
+                    axisConfig.setRepository(axis2repository);
+                    validateSystemPredefinedPhases();
+                    engageModules();
+                } catch (AxisFault axisFault) {
+                    log.info(Messages.getMessage(DeploymentErrorMsgs.MODULE_VALIDATION_FAILED,
+                            axisFault.getMessage()));
+                    throw new DeploymentException(axisFault);
+                }
+                repoListener.checkServices();
+                if (hotDeployment) {
+                    startSearch(repoListener);
+                }
+                return axisConfig;
+            } else {
+                log.info("no repository location found in axis2.xml");
+                validateSystemPredefinedPhases();
+                return axisConfig;
             }
         }
-
-        axisConfig = createEngineConfig();
-
-        AxisConfigBuilder builder = new AxisConfigBuilder(in, this, axisConfig);
-
-        axisConfig.setPhasesinfo(phasesinfo);
-        builder.populateConfig();
-
-        if (isRepositoryExist) {
-            hotDeployment = false;
-            hotUpdate = false;
-
-            // setting CLs
-            setClassLoaders(axis2repository);
-            repoListener = new RepositoryListenerImpl(axis2repository, this);
-        }
-
-        try {
-            axisConfig.setRepository(axis2repository);
-            validateSystemPredefinedPhases();
-            engageModules();
-        } catch (AxisFault axisFault) {
-            log.info(Messages.getMessage(DeploymentErrorMsgs.MODULE_VALIDATION_FAILED,
-                    axisFault.getMessage()));
-
-            throw new DeploymentException(axisFault);
-        }
-
-        if (repoListener != null) {
-            repoListener.checkServices();
-        }
-
-        return axisConfig;
     }
 
     /**
@@ -626,27 +581,23 @@
 
     public void unDeploy() {
         String serviceName = "";
-
         try {
             if (wsToUnDeploy.size() > 0) {
                 for (int i = 0; i < wsToUnDeploy.size(); i++) {
                     WSInfo wsInfo = (WSInfo) wsToUnDeploy.get(i);
-
                     if (wsInfo.getType() == TYPE_SERVICE) {
                         serviceName = getAxisServiceName(wsInfo.getFileName());
-
+                        //TODO : need to remove Servicegroup  from configuration : AXIS2- 390
                         // todo fix me deepal
                         log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
                                 wsInfo.getFileName()));
                     }
-
                     axisConfig.getFaultyServices().remove(serviceName);
                 }
             }
         } catch (Exception e) {
             log.info(e);
         }
-
         wsToUnDeploy.clear();
     }
 
@@ -803,64 +754,38 @@
      * Creates directories for modules/services, copies configuration xml from class loader if necessary
      *
      * @param repositoryName
-     * @param xmlFile
-     * @throws DeploymentException
      */
-    private void prepareRepository(String repositoryName, String xmlFile) throws DeploymentException {
-        File repository = new File(repositoryName);
-
-        if (!repository.exists()) {
-            repository.mkdirs();
 
-            File services = new File(repository, DIRECTORY_SERVICES);
-            File modules = new File(repository, DIRECTORY_MODULES);
+    private void prepareRepository(String repositoryName) {
+        File repository = new File(repositoryName);
 
-            modules.mkdirs();
+        File services = new File(repository, DIRECTORY_SERVICES);
+        if (!services.exists()) {
             services.mkdirs();
+            log.info("no services directory found , new one created");
+        }
+        File modules = new File(repository, DIRECTORY_MODULES);
+        if (!modules.exists()) {
+            modules.mkdirs();
+            log.info("no modules directory found , new one created");
         }
 
-        File serverConf = new File(repository, xmlFile);
-
-        if (!serverConf.exists()) {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            InputStream in = cl.getResourceAsStream(AXIS2_CONFIGURATION_RESOURCE);
-            FileOutputStream out = null;
-
-            if (in != null) {
-                try {
-                    serverConf.createNewFile();
-                    out = new FileOutputStream(serverConf);
-
-                    int BUFSIZE = 512;    // since only a test file going to load , the size has selected
-                    byte[] buf = new byte[BUFSIZE];
-                    int read;
-
-                    while ((read = in.read(buf)) > 0) {
-                        out.write(buf, 0, read);
-                    }
-
-                    in.close();
-                    out.close();
-                } catch (IOException e) {
-                    throw new DeploymentException(e);
-                } finally {
-                    if (out != null) {
-                        try {
-                            out.close();
-                        } catch (IOException e) {
-                            // ignore
-                        }
-                    }
-
-                    try {
-                        in.close();
-                    } catch (IOException e) {
-                        // ignore
-                    }
-                }
+        if (axis2_xml_file_name == null) {
+            File confdir = new File(repository, DIRECTORY_CONF);
+            if (!confdir.exists()) {
+                log.info("conf directory not found , and no axis2.xml file is given ! " +
+                        "System will continue using default_axis2.xml");
+                useDefault = true;
             } else {
-                throw new DeploymentException(
-                        Messages.getMessage(DeploymentErrorMsgs.CONFIG_NOT_FOUND));
+                File axis2xml = new File(confdir, "axis2.xml");
+                if (!axis2xml.exists()) {
+                    useDefault = true;
+                    log.info("axis2.xml file not found in conf directory , " +
+                            "system will continue using default_axis2.xml");
+                } else {
+                    useDefault = false;
+                    axis2_xml_file_name = axis2xml.getAbsolutePath();
+                }
             }
         }
     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/FileSystemConfigurator.java Tue Jan 17 20:24:14 2006
@@ -1,6 +1,7 @@
 package org.apache.axis2.deployment;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisConfigurator;
 
@@ -27,21 +28,25 @@
     /**
      * To check whether need to create a service side or client side
      */
-    private boolean isServer;
+    private String axis2xml;
     private String repoLocation;
 
     /**
      * Load an AxisConfiguration from the repository directory specified
-     * 
+     *
      * @param repoLocation
-     * @param isServer
+     * @param axis2xml
      */
-    public FileSystemConfigurator(String repoLocation, boolean isServer) {
+    public FileSystemConfigurator(String repoLocation, String axis2xml) {
         if (repoLocation == null) {
-            repoLocation = AxisConfiguration.getAxis2HomeDirectory();
+            //checking wether user has set the system property
+            repoLocation = System.getProperty(Constants.HOME_AXIS2);
+        }
+        if (axis2xml == null) {
+            axis2xml  = System.getProperty(Constants.CONF_AXIS2);
         }
         this.repoLocation = repoLocation;
-        this.isServer = isServer;
+        this.axis2xml = axis2xml;
     }
 
     /**
@@ -51,11 +56,7 @@
      * @throws AxisFault
      */
     public AxisConfiguration getAxisConfiguration() throws AxisFault {
-        if (isServer) {
-            DeploymentEngine deploymentEngine = new DeploymentEngine(repoLocation);
-            return deploymentEngine.load();
-        } else {
-            return new DeploymentEngine().loadClient(repoLocation);
-        }
+        return new DeploymentEngine(repoLocation, axis2xml).load();
+
     }
 }

Copied: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/default_axis2.xml (from r368263, webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml)
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/default_axis2.xml?p2=webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/default_axis2.xml&p1=webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml&r1=368263&r2=370041&rev=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/default_axis2.xml Tue Jan 17 20:24:14 2006
@@ -100,7 +100,7 @@
     <!-- Global Modules  -->
     <!-- ================================================= -->
     <!-- Comment this to disable Addressing -->
-    <module ref="addressing"/>
+    <!--<module ref="addressing"/>-->
 
 
     <!--Configuring module , providing parameters for modules whether they refer or not-->

Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/default_axis2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java Tue Jan 17 20:24:14 2006
@@ -17,15 +17,7 @@
 
 package org.apache.axis2.deployment.repository.util;
 
-import org.apache.axis2.deployment.AxisServiceBuilder;
-import org.apache.axis2.deployment.DeploymentConstants;
-import org.apache.axis2.deployment.DeploymentEngine;
-import org.apache.axis2.deployment.DeploymentErrorMsgs;
-import org.apache.axis2.deployment.DeploymentException;
-import org.apache.axis2.deployment.DescriptionBuilder;
-import org.apache.axis2.deployment.ModuleBuilder;
-import org.apache.axis2.deployment.ServiceBuilder;
-import org.apache.axis2.deployment.ServiceGroupBuilder;
+import org.apache.axis2.deployment.*;
 import org.apache.axis2.deployment.util.Utils;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisServiceGroup;
@@ -39,15 +31,7 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
+import java.io.*;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.zip.ZipEntry;
@@ -157,7 +141,7 @@
             if (in == null) {
                 throw new DeploymentException(
                         Messages.getMessage(
-                                DeploymentErrorMsgs.MODULE_XML_MISSING, moduleName));
+                                DeploymentErrorMsgs.MODULE_NOT_FOUND, moduleName));
             } else {
                 if (!modules.exists()) {
                     modules.mkdirs();
@@ -216,7 +200,7 @@
             throws DeploymentException {
         // get attribute values
         if (!extractService) {
-            ZipInputStream zin;
+            ZipInputStream zin = null;
             try {
                 zin = new ZipInputStream(new FileInputStream(filename));
                 ZipEntry entry;
@@ -232,11 +216,19 @@
                         Messages.getMessage(DeploymentErrorMsgs.SERVICE_XML_NOT_FOUND, filename));
             } catch (Exception e) {
                 throw new DeploymentException(e);
+            } finally {
+                if (zin != null) {
+                    try {
+                        zin.close();
+                    } catch (IOException e) {
+                        log.info("error in closing input stream");
+                    }
+                }
             }
         } else {
             File file = new File(filename, SERVICES_XML);
             if (file.exists()) {
-                InputStream in;
+                InputStream in = null;
                 try {
                     in = new FileInputStream(file);
                     axisServiceGroup.setServiceGroupName(engine.getCurrentFileItem().getName());
@@ -247,6 +239,14 @@
                 } catch (XMLStreamException e) {
                     throw new DeploymentException(
                             Messages.getMessage(DeploymentErrorMsgs.XML_STREAM_EXCEPTION, e.getMessage()));
+                } finally {
+                    if (in != null) {
+                        try {
+                            in.close();
+                        } catch (IOException e) {
+                            log.info("error in cloasing input stream");
+                        }
+                    }
                 }
             } else {
                 throw new DeploymentException(

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java Tue Jan 17 20:24:14 2006
@@ -96,37 +96,26 @@
         if (file != null) {
             try {
                 ArrayList urls = new ArrayList();
-
                 urls.add(file.toURL());
-
                 // lower case directory name
                 File libfiles = new File(file, "lib");
-
                 if (libfiles.exists()) {
                     urls.add(libfiles.toURL());
-
                     File jarfiles[] = libfiles.listFiles();
-
                     for (int i = 0; i < jarfiles.length; i++) {
                         File jarfile = jarfiles[i];
-
                         if (jarfile.getName().endsWith(".jar")) {
                             urls.add(jarfile.toURL());
                         }
                     }
                 }
-
                 // upper case directory name
                 libfiles = new File(file, "Lib");
-
                 if (libfiles.exists()) {
                     urls.add(libfiles.toURL());
-
                     File jarfiles[] = libfiles.listFiles();
-
                     for (int i = 0; i < jarfiles.length; i++) {
                         File jarfile = jarfiles[i];
-
                         if (jarfile.getName().endsWith(".jar")) {
                             urls.add(jarfile.toURL());
                         }
@@ -134,13 +123,10 @@
                 }
 
                 URL urllist[] = new URL[urls.size()];
-
                 for (int i = 0; i < urls.size(); i++) {
                     urllist[i] = (URL) urls.get(i);
                 }
-
                 classLoader = new URLClassLoader(urllist, parent);
-
                 return classLoader;
             } catch (MalformedURLException e) {
                 throw new DeploymentException(e);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java Tue Jan 17 20:24:14 2006
@@ -1,103 +1,101 @@
 package org.apache.axis2.description;
 
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.om.OMElement;
 
 public abstract class AxisDescription implements ParameterInclude,
-		DescriptionConstants {
+        DescriptionConstants {
 
-	private AxisDescription parent = null;
+    private AxisDescription parent = null;
 
-	private ParameterInclude parameterInclude;
+    private ParameterInclude parameterInclude;
 
-	private PolicyInclude policyInclude;
+    private PolicyInclude policyInclude;
 
-	private HashMap children = new HashMap();
+    private HashMap children = new HashMap();
 
-	public AxisDescription() {
-		parameterInclude = new ParameterIncludeImpl();
-		policyInclude = new PolicyInclude(this);
-	}
+    public AxisDescription() {
+        parameterInclude = new ParameterIncludeImpl();
+        policyInclude = new PolicyInclude(this);
+    }
 
-	public void addParameter(Parameter param) throws AxisFault {
+    public void addParameter(Parameter param) throws AxisFault {
 
-		if (param == null) {
-			return;
-		}
+        if (param == null) {
+            return;
+        }
 
-		if (isParameterLocked(param.getName())) {
-			throw new AxisFault("Parameter:" + param.getName()
-					+ " is already locked, hence value cannot be overridden");
-		}
+        if (isParameterLocked(param.getName())) {
+            throw new AxisFault("Parameter:" + param.getName()
+                    + " is already locked, hence value cannot be overridden");
+        }
 
-		parameterInclude.addParameter(param);
-	}
+        parameterInclude.addParameter(param);
+    }
 
-	public void deserializeParameters(OMElement parameterElement)
-			throws AxisFault {
+    public void deserializeParameters(OMElement parameterElement)
+            throws AxisFault {
 
-		parameterInclude.deserializeParameters(parameterElement);
+        parameterInclude.deserializeParameters(parameterElement);
 
-	}
+    }
 
-	public Parameter getParameter(String name) {
-		return parameterInclude.getParameter(name);
-	}
+    public Parameter getParameter(String name) {
+        return parameterInclude.getParameter(name);
+    }
 
-	public ArrayList getParameters() {
-		return parameterInclude.getParameters();
-	}
+    public ArrayList getParameters() {
+        return parameterInclude.getParameters();
+    }
 
-	public boolean isParameterLocked(String parameterName) {
+    public boolean isParameterLocked(String parameterName) {
 
-		if (getParent() != null && getParent().isParameterLocked(parameterName)) {
-			return true;
-		}
+        if (getParent() != null && getParent().isParameterLocked(parameterName)) {
+            return true;
+        }
 
-		return getParameter(parameterName) != null
-				&& getParameter(parameterName).isLocked();
-	}
+        return getParameter(parameterName) != null
+                && getParameter(parameterName).isLocked();
+    }
 
-	public void setParent(AxisDescription parent) {
-		this.parent = parent;
-		if (parent.getChild(getKey()) == null
-				|| parent.getChild(getKey()) != this) {
-			parent.addChild(this);
-		}
-	}
+    public void setParent(AxisDescription parent) {
+        this.parent = parent;
+        if (parent.getChild(getKey()) == null
+                || parent.getChild(getKey()) != this) {
+            parent.addChild(this);
+        }
+    }
 
-	public AxisDescription getParent() {
-		return parent;
-	}
+    public AxisDescription getParent() {
+        return parent;
+    }
 
-	public void setPolicyInclude(PolicyInclude policyInclude) {
-		this.policyInclude = policyInclude;
-	}
+    public void setPolicyInclude(PolicyInclude policyInclude) {
+        this.policyInclude = policyInclude;
+    }
 
-	public PolicyInclude getPolicyInclude() {
-		return policyInclude;
-	}
+    public PolicyInclude getPolicyInclude() {
+        return policyInclude;
+    }
 
-	public void addChild(AxisDescription child) {
-		children.put(child.getKey(), child);
-		if (child.getParent() == null || child.getParent() != this) {
-			child.setParent(this);
-		}
-	}
+    public void addChild(AxisDescription child) {
+        children.put(child.getKey(), child);
+        if (child.getParent() == null || child.getParent() != this) {
+            child.setParent(this);
+        }
+    }
 
-	public Iterator getChildren() {
-		return children.values().iterator();
-	}
+    public Iterator getChildren() {
+        return children.values().iterator();
+    }
 
-	public AxisDescription getChild(Object key) {
-		return (AxisDescription) children.get(key);
-	}
+    public AxisDescription getChild(Object key) {
+        return (AxisDescription) children.get(key);
+    }
 
-	public abstract Object getKey();
+    public abstract Object getKey();
 }

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=370041&r1=370040&r2=370041&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 Tue Jan 17 20:24:14 2006
@@ -23,7 +23,6 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.MessageReceiver;
-import org.apache.axis2.om.OMElement;
 import org.apache.axis2.util.PolicyUtil;
 import org.apache.axis2.wsdl.writer.WOMWriter;
 import org.apache.axis2.wsdl.writer.WOMWriterFactory;
@@ -42,11 +41,7 @@
 import javax.xml.namespace.QName;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
+import java.util.*;
 
 /**
  * Class AxisService
@@ -587,8 +582,8 @@
     public void setUseDefaultChains(boolean useDefaultChains) {
         this.useDefaultChains = useDefaultChains;
     }
-    
+
     public Object getKey() {
-    	return getName();
+        return getName();
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java Tue Jan 17 20:24:14 2006
@@ -312,6 +312,7 @@
      * @throws AxisFault
      */
     private MessageContext send(MessageContext msgctx) throws AxisFault {
+
         AxisEngine engine = new AxisEngine(msgctx.getConfigurationContext());
 
         engine.send(msgctx);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java Tue Jan 17 20:24:14 2006
@@ -23,20 +23,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.AxisDescription;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.HandlerDescription;
-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.PolicyInclude;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.om.OMElement;
+import org.apache.axis2.description.*;
 import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.util.HostConfiguration;
@@ -46,12 +33,7 @@
 
 import javax.xml.namespace.QName;
 import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 /**
  * Class AxisConfigurationImpl
@@ -284,7 +266,7 @@
 
     /**
      * Engages the default module version corresponding to given module name , or if the module
-     * name contains version number in it then it will engage the correct module. 
+     * name contains version number in it then it will engage the correct module.
      * Both of the below two cases are valid
      * 1. engageModule("addressing");
      * 2. engageModule("addressing-1.23");
@@ -637,7 +619,7 @@
 
     /**
      * Adds a dafault module version , which can be done either programatically or by using
-     * axis2.xml . The default module version is important if user asks to engage 
+     * axis2.xml . The default module version is important if user asks to engage
      * a module without given version ID, in which case, we will engage the default version.
      *
      * @param moduleName
@@ -661,8 +643,8 @@
             return (ModuleDescription) allModules.get(new QName(moduleName + "-" + defualtModuleVersion));
         }
     }
-    
+
     public Object getKey() {
-    	return getAxis2HomeDirectory(); // TODO CheckMe
+        return getAxis2HomeDirectory(); // TODO CheckMe
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java Tue Jan 17 20:24:14 2006
@@ -45,8 +45,8 @@
  */
 public class AxisServlet extends HttpServlet {
 
-	private static final long serialVersionUID = -2085869393709833372L;
-	private static final String CONFIGURATION_CONTEXT = "CONFIGURATION_CONTEXT";
+    private static final long serialVersionUID = -2085869393709833372L;
+    private static final String CONFIGURATION_CONTEXT = "CONFIGURATION_CONTEXT";
     public static final String SESSION_ID = "SessionId";
     private ConfigurationContext configContext;
     private AxisConfiguration axisConfiguration;
@@ -208,7 +208,7 @@
             ServletContext context = config.getServletContext();
             String repoDir = context.getRealPath("/WEB-INF");
             ConfigurationContextFactory erfac = new ConfigurationContextFactory();
-            ConfigurationContext configContext = erfac.createConfigurationContextFromFileSystem(repoDir);
+            ConfigurationContext configContext = erfac.createConfigurationContextFromFileSystem(repoDir, null);
             configContext.setProperty(Constants.CONTAINER_MANAGED, Constants.VALUE_TRUE);
             configContext.setRootDir(new File(context.getRealPath("/WEB-INF")));
             return configContext;

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java Tue Jan 17 20:24:14 2006
@@ -83,11 +83,11 @@
     /**
      * Constructor SimpleHTTPServer
      *
-     * @param dir
+     * @param repoPath
      * @throws AxisFault
      */
-    public SimpleHTTPServer(String dir, int port) throws AxisFault {
-        this(dir, port, null);
+    public SimpleHTTPServer(String repoPath, String axis2xml, int port) throws AxisFault {
+        this(repoPath, axis2xml, port, null);
     }
 
     /**
@@ -114,17 +114,17 @@
     /**
      * Constructor SimpleHTTPServer
      *
-     * @param dir
+     * @param repoPath
      * @param pool
      * @throws AxisFault
      */
-    public SimpleHTTPServer(String dir, int port, ThreadFactory pool) throws AxisFault {
+    public SimpleHTTPServer(String repoPath, String axis2xml, int port, ThreadFactory pool) throws AxisFault {
         try {
             this.port = port;
 
             ConfigurationContextFactory erfac = new ConfigurationContextFactory();
-
-            this.configurationContext = erfac.createConfigurationContextFromFileSystem(dir);
+            this.configurationContext = erfac.createConfigurationContextFromFileSystem(repoPath,
+                    axis2xml);
 
             // If a thread pool is not passed the thread pool from the config context
             // is used. If one is passed it is set on the config context.
@@ -189,12 +189,14 @@
         System.out.println("[SimpleHTTPServer] Using the Axis2 Repository "
                 + new File(args[0]).getAbsolutePath());
         System.out.println("[SimpleHTTPServer] Listening on port " + port);
-        try  {
-            SimpleHTTPServer receiver = new SimpleHTTPServer(args[0], port);
-            Runtime.getRuntime().addShutdownHook(new ShutdownThread(receiver));
-            receiver.start();
-            System.out.println("[SimpleHTTPServer] Started");
-        } catch (Throwable t){
+        try {
+            throw new UnsupportedOperationException("hey please fix me Deepal , I dont have axis2.xml location");
+            //todo : Deepal pls fix me
+//            SimpleHTTPServer receiver = new SimpleHTTPServer(args[0], null, port);
+//            Runtime.getRuntime().addShutdownHook(new ShutdownThread(receiver));
+//            receiver.start();
+//            System.out.println("[SimpleHTTPServer] Started");
+        } catch (Throwable t) {
             log.fatal("Error starting SimpleHTTPServer", t);
             System.out.println("[SimpleHTTPServer] Shutting down");
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/SimpleJMSListener.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/SimpleJMSListener.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/SimpleJMSListener.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/SimpleJMSListener.java Tue Jan 17 20:24:14 2006
@@ -32,6 +32,7 @@
 import javax.jms.BytesMessage;
 import javax.jms.MessageListener;
 import java.io.BufferedInputStream;
+import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.HashMap;
@@ -68,8 +69,17 @@
                              boolean doThreads)
             throws Exception {
         ConfigurationContextFactory erfac = new ConfigurationContextFactory();
+        //TODO : modify this constructor to take locatiom of axis2.xml
+        File repo = new File(repositoryDirectory);
+        if (repo.exists()) {
+            File axis2xml = new File(repo, "axis2.xml");
+            this.configurationContext = erfac.createConfigurationContextFromFileSystem(
+                    repositoryDirectory, axis2xml.getName());
+        } else {
+            throw new Exception("repository not found");
+        }
+
 
-        this.configurationContext = erfac.createConfigurationContextFromFileSystem(repositoryDirectory);
         this.doThreads = doThreads;
         this.properties = new HashMap(connectorMap);
         this.properties.putAll(cfMap);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java Tue Jan 17 20:24:14 2006
@@ -86,7 +86,14 @@
         try {
             ConfigurationContextFactory builder = new ConfigurationContextFactory();
 
-            configurationContext = builder.createConfigurationContextFromFileSystem(dir);
+            File repo = new File(dir);
+            if (repo.exists()) {
+                File axis2xml = new File(repo, "axis2.xml");
+                this.configurationContext = builder.createConfigurationContextFromFileSystem(
+                        dir, axis2xml.getName());
+            } else {
+                throw new Exception("repository not found");
+            }
         } catch (Exception e) {
             log.info(e.getMessage());
         }
@@ -141,14 +148,21 @@
         if (args.length != 1) {
             log.info("java SimpleMailListener <repository>");
         } else {
+            String dir = args[0];
             ConfigurationContextFactory builder = new ConfigurationContextFactory();
-            ConfigurationContext configurationContext =
-                    builder.createConfigurationContextFromFileSystem(args[0]);
+            ConfigurationContext configurationContext;
+            File repo = new File(dir);
+            if (repo.exists()) {
+                File axis2xml = new File(repo, "axis2.xml");
+                configurationContext = builder.createConfigurationContextFromFileSystem(
+                        dir, axis2xml.getName());
+            } else {
+                throw new AxisFault("repository not found");
+            }
             SimpleMailListener sas = new SimpleMailListener();
             TransportInDescription transportIn =
                     configurationContext.getAxisConfiguration().getTransportIn(
                             new QName(Constants.TRANSPORT_MAIL));
-
             if (transportIn != null) {
                 sas.init(configurationContext, transportIn);
                 log.info("Starting the SimpleMailListener with repository "

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailServer.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailServer.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailServer.java Tue Jan 17 20:24:14 2006
@@ -49,7 +49,7 @@
         try {
             ConfigurationContextFactory builder = new ConfigurationContextFactory();
 
-            configurationContext = builder.createConfigurationContextFromFileSystem(dir);
+            configurationContext = builder.createConfigurationContextFromFileSystem(dir, null);
         } catch (Exception e) {
             log.error(e);
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java Tue Jan 17 20:24:14 2006
@@ -61,7 +61,7 @@
         try {
             ConfigurationContextFactory erfac = new ConfigurationContextFactory();
 
-            this.configContext = erfac.createConfigurationContextFromFileSystem(dir);
+            this.configContext = erfac.createConfigurationContextFromFileSystem(dir, null);
             Thread.sleep(3000);
             serversocket = new ServerSocket(port);
         } catch (DeploymentException e1) {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java?rev=370041&r1=370040&r2=370041&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java Tue Jan 17 20:24:14 2006
@@ -22,22 +22,8 @@
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.client.Options;
-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.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.Flow;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.InOutAxisOperation;
-import org.apache.axis2.description.ModuleDescription;
-import org.apache.axis2.description.OutInAxisOperation;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.ParameterImpl;
-import org.apache.axis2.description.PhaseRule;
+import org.apache.axis2.context.*;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Handler;
 import org.apache.axis2.engine.MessageReceiver;
@@ -249,8 +235,12 @@
             throw new Exception("repository directory " + file.getAbsolutePath()
                     + " does not exists");
         }
-
-        return erfac.createConfigurationContextFromFileSystem(file.getAbsolutePath());
+        File axis2xml = new File(file, "axis.xml");
+        String axis2xmlString = null;
+        if(axis2xml.exists()){
+            axis2xmlString = axis2xml.getName();
+        }
+        return erfac.createConfigurationContextFromFileSystem(file.getAbsolutePath(),axis2xmlString);
     }
 
     public static String getParameterValue(Parameter param) {