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 2005/04/26 06:29:39 UTC
svn commit: r164738 - in /webservices/axis/trunk/java/modules/core:
src/org/apache/axis/context/ src/org/apache/axis/deployment/
test/org/apache/axis/deployment/
Author: deepal
Date: Mon Apr 25 21:29:37 2005
New Revision: 164738
URL: http://svn.apache.org/viewcvs?rev=164738&view=rev
Log:
added client side confgiguration
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadModuleTest.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadServerXMLTest.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java?rev=164738&r1=164737&r2=164738&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java Mon Apr 25 21:29:37 2005
@@ -37,6 +37,25 @@
return engineContext;
}
+ public EngineContext buildClientEngineContext(String axis2home) throws DeploymentException {
+ EngineContext engineContext = null;
+ try {
+ DeploymentEngine deploymentEngine = new DeploymentEngine(axis2home);
+ EngineConfiguration configuration = deploymentEngine.loadClient();
+ PhaseResolver phaseResolver = new PhaseResolver(configuration);
+ engineContext = phaseResolver.buildGlobalChains();
+ phaseResolver.buildTranspotsChains();
+ initModules(engineContext);
+ } catch (AxisFault axisFault) {
+ throw new DeploymentException(axisFault.getMessage()) ;
+ } catch (PhaseException e) {
+ throw new DeploymentException(e.getMessage()) ;
+ }
+ return engineContext;
+ }
+
+
+
private void initModules(EngineContext context) throws DeploymentException {
try{
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java?rev=164738&r1=164737&r2=164738&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java Mon Apr 25 21:29:37 2005
@@ -69,7 +69,7 @@
private String folderName;
- private String serverConfigName;
+ private String engineConfigName;
/**
* This to keep a referance to serverMetaData object
@@ -137,7 +137,7 @@
}
}
- this.serverConfigName = RepositaryName + '/' + serverXMLFile;
+ this.engineConfigName = RepositaryName + '/' + serverXMLFile;
}
public HDFileItem getCurrentFileItem() {
@@ -175,15 +175,15 @@
}
public EngineConfiguration load() throws DeploymentException {
- if (serverConfigName == null) {
+ if (engineConfigName == null) {
throw new DeploymentException("path to Server.xml can not be NUll");
}
- File tempfile = new File(serverConfigName);
+ File tempfile = new File(engineConfigName);
try {
InputStream in = new FileInputStream(tempfile);
engineconfig = createEngineConfig();
DeploymentParser parser = new DeploymentParser(in, this);
- parser.procesServerXML(axisGlobal);
+ parser.processGlobalConfig(axisGlobal);
} catch (FileNotFoundException e) {
throw new DeploymentException("Exception at deployment", e);
} catch (AxisFault axisFault) {
@@ -197,6 +197,36 @@
} else {
new RepositoryListenerImpl(folderName, this);
}
+ try {
+ validateServerModule();
+ } catch (AxisFault axisFault) {
+ log.info("Module validation failed" + axisFault.getMessage());
+ throw new DeploymentException(axisFault.getMessage());
+ }
+ return engineconfig;
+ }
+
+
+ public EngineConfiguration loadClient() throws DeploymentException {
+ if (engineConfigName == null) {
+ throw new DeploymentException("path to Client.xml can not be NUll");
+ }
+ File tempfile = new File(engineConfigName);
+ try {
+ InputStream in = new FileInputStream(tempfile);
+ engineconfig = createEngineConfig();
+ DeploymentParser parser = new DeploymentParser(in, this);
+ parser.processGlobalConfig(axisGlobal);
+ } catch (FileNotFoundException e) {
+ throw new DeploymentException("Exception at deployment", e);
+ } catch (AxisFault axisFault) {
+ throw new DeploymentException(axisFault.getMessage());
+ } catch (XMLStreamException e) {
+ throw new DeploymentException(e.getMessage());
+ }
+ hotDeployment = false;
+ hotUpdate = false;
+ new RepositoryListenerImpl(folderName, this);
try {
validateServerModule();
} catch (AxisFault axisFault) {
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java?rev=164738&r1=164737&r2=164738&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java Mon Apr 25 21:29:37 2005
@@ -90,7 +90,7 @@
/**
* To process server.xml
*/
- public void procesServerXML(AxisGlobal serverMetaData) throws DeploymentException {
+ public void processGlobalConfig(AxisGlobal axisGlobal) throws DeploymentException {
try {
boolean END_DOCUMENT = false;
while (!END_DOCUMENT) {
@@ -105,7 +105,7 @@
//todo complete this to fill the names
} else if (PARAMETERST.equals(ST)) {
Parameter parameter = processParameter();
- serverMetaData.addParameter(parameter);
+ axisGlobal.addParameter(parameter);
} else if (TRANSPORTSENDER.equals(ST)) {
AxisTransportOut transportout = proccessTrasnsportOUT();
dpengine.getEngineconfig().addTransportOut(transportout);
@@ -121,7 +121,7 @@
String attname = pullparser.getAttributeLocalName(i);
String attvalue = pullparser.getAttributeValue(i);
if (REF.equals(attname)) {
- serverMetaData.addModule(new QName(attvalue));
+ axisGlobal.addModule(new QName(attvalue));
}
}
}
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadModuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadModuleTest.java?rev=164738&r1=164737&r2=164738&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadModuleTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadModuleTest.java Mon Apr 25 21:29:37 2005
@@ -36,7 +36,7 @@
InputStream in = new FileInputStream(getTestResourceFile("deployment/Badmodule.xml"));
DeploymentParser parser = new DeploymentParser(in, null);
AxisGlobal glabl = new AxisGlobal();
- parser.procesServerXML(glabl);
+ parser.processGlobalConfig(glabl);
fail("this must failed gracefully with DeploymentException or FileNotFoundException");
} catch (FileNotFoundException e) {
return;
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadServerXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadServerXMLTest.java?rev=164738&r1=164737&r2=164738&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadServerXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/deployment/BadServerXMLTest.java Mon Apr 25 21:29:37 2005
@@ -36,7 +36,7 @@
InputStream in = new FileInputStream(getTestResourceFile("deployment/BadServer.xml"));
DeploymentParser parser = new DeploymentParser(in, null);
AxisGlobal glabl = new AxisGlobal();
- parser.procesServerXML(glabl);
+ parser.processGlobalConfig(glabl);
fail("this must failed gracefully with DeploymentException or FileNotFoundException");
} catch (FileNotFoundException e) {
return;