You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2005/06/21 10:28:58 UTC
svn commit: r191641 - in /webservices/axis/trunk/java/modules:
addressing/test/org/apache/axis/handlers/addressing/
core/src/org/apache/axis/clientapi/ core/src/org/apache/axis/context/
core/src/org/apache/axis/transport/http/ core/src/org/apache/axis/...
Author: deepal
Date: Tue Jun 21 01:28:55 2005
New Revision: 191641
URL: http://svn.apache.org/viewcvs?rev=191641&view=rev
Log:
added a module engage test case and did some refactoring
Added:
webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/ModuleEngaeTest.java
Modified:
webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ConfigurationContextFactory.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListener.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java
webservices/axis/trunk/java/modules/core/test-resources/deployment/echo/org/apache/axis/echo/Echo.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildWithAddressingTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/InvalidServiceTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/ModifiedConfigFileTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/SystemPhasesremovedTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextInjectionTest.java
webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java
webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilsTCPServer.java
webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailOneWayRawXMLTest.java
webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java
Modified: webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java (original)
+++ webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java Tue Jun 21 01:28:55 2005
@@ -40,7 +40,7 @@
public void testExtractAddressingInformationFromHeaders() throws AxisFault {
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- AxisConfiguration er = builder.buildEngineContext("target").getAxisConfiguration();
+ AxisConfiguration er = builder.buildConfigurationContext("target").getAxisConfiguration();
File file = new File("target/addressing.mar");
assertTrue(file.exists());
ModuleDescription moduleDesc = er.getModule(new QName("addressing"));
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java Tue Jun 21 01:28:55 2005
@@ -121,7 +121,7 @@
ConfigurationContext sysContext = null;
if (ListenerManager.configurationContext == null) {
ConfigurationContextFactory efac = new ConfigurationContextFactory();
- sysContext = efac.buildClientEngineContext(null);
+ sysContext = efac.buildClientConfigurationContext(null);
}else{
sysContext = ListenerManager.configurationContext;
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java Tue Jun 21 01:28:55 2005
@@ -88,7 +88,7 @@
* Follwoing code works for the time been
* <code>
* ConfigurationContextFactory efac = new ConfigurationContextFactory();
- ConfigurationContext sysContext = efac.buildClientEngineContext(null);
+ ConfigurationContext sysContext = efac.buildClientConfigurationContext(null);
// above line "null" may be a file name if you know the client repssitory
//create new service
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java Tue Jun 21 01:28:55 2005
@@ -51,7 +51,7 @@
ConfigurationContext sysContext = null;
if (ListenerManager.configurationContext == null) {
ConfigurationContextFactory efac = new ConfigurationContextFactory();
- sysContext = efac.buildClientEngineContext(null);
+ sysContext = efac.buildClientConfigurationContext(null);
} else {
sysContext = ListenerManager.configurationContext;
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ConfigurationContextFactory.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ConfigurationContextFactory.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ConfigurationContextFactory.java Tue Jun 21 01:28:55 2005
@@ -26,7 +26,7 @@
*/
public class ConfigurationContextFactory {
- public ConfigurationContext buildEngineContext(String RepositaryName) throws DeploymentException {
+ public ConfigurationContext buildConfigurationContext(String RepositaryName) throws DeploymentException {
ConfigurationContext configurationContext = null;
try {
DeploymentEngine deploymentEngine = new DeploymentEngine(RepositaryName);
@@ -41,7 +41,7 @@
return configurationContext;
}
- public ConfigurationContext buildClientEngineContext(String axis2home) throws DeploymentException {
+ public ConfigurationContext buildClientConfigurationContext(String axis2home) throws DeploymentException {
ConfigurationContext engineContext = null;
try {
AxisConfiguration configuration = new DeploymentEngine().loadClient(axis2home);
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java Tue Jun 21 01:28:55 2005
@@ -78,7 +78,7 @@
ServletContext context = config.getServletContext();
String repoDir = context.getRealPath("/WEB-INF");
ConfigurationContextFactory erfac = new ConfigurationContextFactory();
- configContext = erfac.buildEngineContext(repoDir);
+ configContext = erfac.buildConfigurationContext(repoDir);
configContext.setProperty(Constants.CONTAINER_MANAGED, Constants.VALUE_TRUE);
lister = new ListingAgent(configContext);
} catch (Exception e) {
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java Tue Jun 21 01:28:55 2005
@@ -103,7 +103,7 @@
this.serverSocket = serverSoc;
// Class erClass = Class.forName("org.apache.axis.deployment.EngineContextFactoryImpl");
ConfigurationContextFactory erfac = new ConfigurationContextFactory();
- this.configurationContext = erfac.buildEngineContext(dir);
+ this.configurationContext = erfac.buildConfigurationContext(dir);
Thread.sleep(2000);
} catch (Exception e1) {
throw new AxisFault("Thread interuptted", e1);
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListener.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListener.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListener.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/SimpleMailListener.java Tue Jun 21 01:28:55 2005
@@ -86,7 +86,7 @@
this.password = password;
try {
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- configurationContext = builder.buildEngineContext(dir);
+ configurationContext = builder.buildConfigurationContext(dir);
} catch (Exception e) {
e.printStackTrace();
}
@@ -232,7 +232,7 @@
System.out.println("java SimpleMailListener <repository>");
} else {
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- ConfigurationContext configurationContext = builder.buildEngineContext(args[0]);
+ ConfigurationContext configurationContext = builder.buildConfigurationContext(args[0]);
SimpleMailListener sas = new SimpleMailListener();
TransportInDescription transportIn =
configurationContext.getAxisConfiguration().getTransportIn(
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java Tue Jun 21 01:28:55 2005
@@ -62,7 +62,7 @@
public TCPServer(int port, String dir) throws AxisFault {
try {
ConfigurationContextFactory erfac = new ConfigurationContextFactory();
- ConfigurationContext configContext = erfac.buildEngineContext(dir);
+ ConfigurationContext configContext = erfac.buildConfigurationContext(dir);
this.configContext = configContext;
serversocket = new ServerSocket(port);
} catch (DeploymentException e1) {
Modified: webservices/axis/trunk/java/modules/core/test-resources/deployment/echo/org/apache/axis/echo/Echo.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test-resources/deployment/echo/org/apache/axis/echo/Echo.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test-resources/deployment/echo/org/apache/axis/echo/Echo.java (original)
+++ webservices/axis/trunk/java/modules/core/test-resources/deployment/echo/org/apache/axis/echo/Echo.java Tue Jun 21 01:28:55 2005
@@ -1,24 +1,32 @@
package org.apache.axis.echo;
import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMAbstractFactory;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import java.io.FileInputStream;
+import java.io.File;
/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
/**
* Author : Deepal Jayasinghe
@@ -30,9 +38,23 @@
public Echo() {
}
public OMElement viewVersion(OMElement omEle) {
- omEle.getNextSibling();
- omEle.detach();
- return omEle;
+ File aFile = new File("E:\\TestCase\\Soap.txt");
+ FileInputStream inputFile = null; //Place to store the input stream reference
+ try {
+ inputFile = new FileInputStream(aFile);
+ XMLStreamReader xmlr =
+ null;
+
+ xmlr = XMLInputFactory.newInstance().createXMLStreamReader(inputFile);
+ OMXMLParserWrapper builder =
+ OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactory.getOMFactory(), xmlr);
+ OMElement doc = builder.getDocumentElement();
+ doc.build();
+ return doc;
+ }catch(Exception e) {
+ return null;
+ }
+
}
}
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java Tue Jun 21 01:28:55 2005
@@ -36,7 +36,7 @@
public void testDeployment() throws Exception {
String filename = "./target/test-resources/deployment";
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- AxisConfiguration er = builder.buildEngineContext(filename).getAxisConfiguration();
+ AxisConfiguration er = builder.buildConfigurationContext(filename).getAxisConfiguration();
assertNotNull(er);
ServiceDescription service = er.getService(new QName("service2"));
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildWithAddressingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildWithAddressingTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildWithAddressingTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BuildWithAddressingTest.java Tue Jun 21 01:28:55 2005
@@ -43,7 +43,7 @@
//todo this test has to be complete Deepal once addressing module finalize
/* String filename = "./target/test-resources/deployment";
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- ConfigurationContext er = builder.buildEngineContext(filename);
+ ConfigurationContext er = builder.buildConfigurationContext(filename);
ArrayList phases = er.getPhases(AxisConfiguration.INFLOW);
ModuleDescription modeule = er.getEngineConfig().getModule(new QName("addressing"));
assertNotNull(modeule);
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/DeploymentotalTest.java Tue Jun 21 01:28:55 2005
@@ -30,7 +30,7 @@
public void testparseService1() throws PhaseException, DeploymentException, AxisFault, XMLStreamException {
String filename = "./target/test-resources/deployment";
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- er = builder.buildEngineContext(filename).getAxisConfiguration();
+ er = builder.buildConfigurationContext(filename).getAxisConfiguration();
}
}
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/InvalidServiceTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/InvalidServiceTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/InvalidServiceTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/InvalidServiceTest.java Tue Jun 21 01:28:55 2005
@@ -38,7 +38,7 @@
try {
String filename = "./target/test-resources/InvalidDeployment";
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- er = builder.buildEngineContext(filename).getAxisConfiguration();
+ er = builder.buildConfigurationContext(filename).getAxisConfiguration();
String msg = (String) er.getFaulytServices().get("invalidService");
if (msg == null || msg.equals("")) {
fail("this must failed gracefully with AxisFault ervice specifi module can not" +
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/ModifiedConfigFileTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/ModifiedConfigFileTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/ModifiedConfigFileTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/ModifiedConfigFileTest.java Tue Jun 21 01:28:55 2005
@@ -39,7 +39,7 @@
try {
String filename = "./test-resources/deployment/BadConfigOrderChange";
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- er = builder.buildEngineContext(filename).getAxisConfiguration();
+ er = builder.buildConfigurationContext(filename).getAxisConfiguration();
fail("this must failed gracefully with DeploymentException \"Invalid System predefined " +
"inphases , phase order dose not\" +\n support\\n recheck server.xml\"");
} catch (DeploymentException e) {
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/SystemPhasesremovedTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/SystemPhasesremovedTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/SystemPhasesremovedTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/SystemPhasesremovedTest.java Tue Jun 21 01:28:55 2005
@@ -35,7 +35,7 @@
try {
String filename = "./test-resources/deployment/SystemPhaseRemove";
ConfigurationContextFactory builder = new ConfigurationContextFactory();
- er = builder.buildEngineContext(filename).getAxisConfiguration();
+ er = builder.buildConfigurationContext(filename).getAxisConfiguration();
fail("this must failed gracefully with DeploymentException \"Invalid System predefined " +
"inphases , phase order dose not\" +\n support\\n recheck server.xml\"");
} catch (DeploymentException e) {
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextInjectionTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextInjectionTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextInjectionTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextInjectionTest.java Tue Jun 21 01:28:55 2005
@@ -72,7 +72,7 @@
protected void setUp() throws Exception {
ConfigurationContextFactory builder = new ConfigurationContextFactory();
ConfigurationContext configContext =
- builder.buildEngineContext(org.apache.axis.Constants.TESTING_REPOSITORY);
+ builder.buildConfigurationContext(org.apache.axis.Constants.TESTING_REPOSITORY);
LocalTransportReceiver.CONFIG_CONTEXT = configContext;
ServiceDescription service = new ServiceDescription(serviceName);
Added: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/ModuleEngaeTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/ModuleEngaeTest.java?rev=191641&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/ModuleEngaeTest.java (added)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/ModuleEngaeTest.java Tue Jun 21 01:28:55 2005
@@ -0,0 +1,53 @@
+package org.apache.axis.engine;
+
+import junit.framework.TestCase;
+import org.apache.axis.phaseresolver.PhaseException;
+import org.apache.axis.deployment.DeploymentException;
+import org.apache.axis.context.ConfigurationContextFactory;
+import org.apache.axis.description.ModuleDescription;
+import org.apache.axis.description.ServiceDescription;
+import org.apache.axis.description.OperationDescription;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.namespace.QName;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
+/**
+ * Author : Deepal Jayasinghe
+ * Date: Jun 21, 2005
+ * Time: 2:09:04 PM
+ */
+public class ModuleEngaeTest extends TestCase{
+ AxisConfiguration ac;
+
+ public void testModuleEngageMent() throws PhaseException, DeploymentException, AxisFault, XMLStreamException {
+ String filename = "./target/test-resources/deployment";
+ ConfigurationContextFactory builder = new ConfigurationContextFactory();
+ ac = builder.buildConfigurationContext(filename).getAxisConfiguration();
+ ModuleDescription module = ac.getModule(new QName("module1"));
+ assertNotNull(module);
+ ac.engageModule(new QName("module1"));
+ ServiceDescription service = ac.getService(new QName("service2"));
+ assertNotNull(service);
+ OperationDescription moduleOperation = service.getOperation(new QName("creatSeq"));
+ assertNotNull(moduleOperation);
+ }
+
+}
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java Tue Jun 21 01:28:55 2005
@@ -56,7 +56,7 @@
if (!file.exists()) {
throw new Exception("repository directory does not exists");
}
- ConfigurationContext er = erfac.buildEngineContext(file.getAbsolutePath());
+ ConfigurationContext er = erfac.buildConfigurationContext(file.getAbsolutePath());
try {
Thread.sleep(2000);
} catch (InterruptedException e1) {
@@ -101,7 +101,7 @@
ModuleDescription moduleDesc = deploymentEngine.buildModule(file);
ConfigurationContextFactory efac = new ConfigurationContextFactory();
- ConfigurationContext sysContext = efac.buildClientEngineContext(null);
+ ConfigurationContext sysContext = efac.buildClientConfigurationContext(null);
sysContext.getAxisConfiguration().addMdoule(moduleDesc);
//sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilsTCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilsTCPServer.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilsTCPServer.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilsTCPServer.java Tue Jun 21 01:28:55 2005
@@ -59,7 +59,7 @@
}
configurationContext =
- erfac.buildEngineContext(file.getAbsolutePath());
+ erfac.buildConfigurationContext(file.getAbsolutePath());
try {
Thread.sleep(2000);
} catch (InterruptedException e1) {
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailOneWayRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailOneWayRawXMLTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailOneWayRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailOneWayRawXMLTest.java Tue Jun 21 01:28:55 2005
@@ -186,7 +186,7 @@
public ConfigurationContext createConfigurationContext() throws Exception {
ConfigurationContextFactory builder = new ConfigurationContextFactory();
ConfigurationContext configContext =
- builder.buildEngineContext(org.apache.axis.Constants.TESTING_REPOSITORY);
+ builder.buildConfigurationContext(org.apache.axis.Constants.TESTING_REPOSITORY);
TransportInDescription transportIn =
new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java?rev=191641&r1=191640&r2=191641&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java Tue Jun 21 01:28:55 2005
@@ -165,7 +165,7 @@
public ConfigurationContext createServerConfigurationContext() throws Exception {
ConfigurationContextFactory builder = new ConfigurationContextFactory();
ConfigurationContext configContext =
- builder.buildEngineContext(org.apache.axis.Constants.TESTING_REPOSITORY);
+ builder.buildConfigurationContext(org.apache.axis.Constants.TESTING_REPOSITORY);
TransportInDescription transportIn =
new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
@@ -194,7 +194,7 @@
public ConfigurationContext createClientConfigurationContext() throws Exception {
ConfigurationContextFactory builder = new ConfigurationContextFactory();
ConfigurationContext configContext =
- builder.buildEngineContext(org.apache.axis.Constants.TESTING_REPOSITORY);
+ builder.buildConfigurationContext(org.apache.axis.Constants.TESTING_REPOSITORY);
TransportInDescription transportIn =
new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));