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/05/19 12:32:16 UTC
svn commit: r170910 - in /webservices/axis/trunk/java/modules:
core/src/org/apache/axis/context/ core/src/org/apache/axis/deployment/
core/src/org/apache/axis/description/ core/src/org/apache/axis/engine/
core/src/org/apache/axis/phaseresolver/ samples/test/org/apache/axis/engine/
Author: deepal
Date: Thu May 19 03:32:13 2005
New Revision: 170910
URL: http://svn.apache.org/viewcvs?rev=170910&view=rev
Log:
engage module for each *Descriptors
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.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/src/org/apache/axis/description/OperationDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfiguration.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java?rev=170910&r1=170909&r2=170910&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/EngineContextFactory.java Thu May 19 03:32:13 2005
@@ -93,7 +93,7 @@
}
private void engageModules(ServiceDescription service, AxisConfiguration context) throws AxisFault {
- ArrayList servicemodules = (ArrayList) service.getModules();
+ ArrayList servicemodules = (ArrayList) service.getEngagedModules();
ArrayList opModules;
Module module;
Collection operations = service.getOperations().values();
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=170910&r1=170909&r2=170910&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 Thu May 19 03:32:13 2005
@@ -292,7 +292,7 @@
* are exist , or they have deployed
*/
private void validateModuleRefs() throws AxisFault {
- Iterator itr = ((AxisSystemImpl)axisConfig).getModuleList().iterator();
+ Iterator itr = ((AxisSystemImpl)axisConfig).getEngadgedModules().iterator();
while (itr.hasNext()) {
QName qName = (QName) itr.next();
if (getModule(qName) == null) {
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=170910&r1=170909&r2=170910&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 Thu May 19 03:32:13 2005
@@ -154,7 +154,8 @@
String attname = pullparser.getAttributeLocalName(i);
String attvalue = pullparser.getAttributeValue(i);
if (REF.equals(attname)) {
- axisGlobal.addModule(new QName(attvalue));
+ //axisGlobal.addModule(new QName(attvalue));
+ //todo fix me deepal
}
}
}
@@ -375,6 +376,22 @@
} else if (OPRATIONST.equals(ST)) {
OperationDescription operation = processOperation();
DeploymentData.getInstance().setOperationPhases(operation);
+ if(operation.getMessageReciever() == null ) {
+ try {
+ /**
+ * Setting default Message Recive as Message Reciever
+ */
+ ClassLoader loader1 = Thread.currentThread().getContextClassLoader();
+ Class messageReceiver = Class.forName("org.apache.axis.receivers.RawXMLINOutMessageRecevier", true, loader1);
+ operation.setMessageReciever((MessageReceiver) messageReceiver.newInstance());
+ } catch (ClassNotFoundException e) {
+ throw new DeploymentException("Error in loading messageRecivers " + e.getMessage());
+ } catch (IllegalAccessException e) {
+ throw new DeploymentException("Error in loading messageRecivers " + e.getMessage());
+ } catch (InstantiationException e) {
+ throw new DeploymentException("Error in loading messageRecivers " + e.getMessage());
+ }
+ }
axisService.addOperation(operation);
} else if (INFLOWST.equals(ST)) {
Flow inFlow = processInFlow();
@@ -397,8 +414,10 @@
if (REF.equals(attname)) {
if (dpengine.getModule(new QName(attvalue)) == null) {
throw new DeploymentException(ST + " module is invalid or dose not have bean deployed");
- } else
- axisService.addModule(new QName(attvalue));
+ } else {
+ //TODO Fix me Deepal
+ // axisService.addModule(new QName(attvalue));
+ }
}
}
}
@@ -635,8 +654,10 @@
if (REF.equals(attname)) {
if (dpengine.getModule(new QName(attvalue)) == null) {
throw new DeploymentException(ST + " module is invalid or dose not have bean deployed");
- } else
- operation.addModule(new QName(attvalue));
+ } else {
+ //operation.addModule(new QName(attvalue));
+ //TODO Fix me Deepal
+ }
}
}
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java?rev=170910&r1=170909&r2=170910&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java Thu May 19 03:32:13 2005
@@ -55,23 +55,30 @@
this.setName(name);
}
- public void addModule(QName moduleref) {
- if (moduleref == null) {
- return;
- }
- Collection collectionModule = (Collection) this
- .getComponentProperty(MODULEREF_KEY);
- collectionModule.add(moduleref);
- }
+ /** To ebgage a module it is reuired to use this method
+ * @param moduleref
+ * @throws AxisFault
+ */
+ public void engageModule(QName moduleref) throws AxisFault {
+ //TODO Fix me Deepal
+ if (moduleref == null) {
+ return;
+ }
+ Collection collectionModule = (Collection) this.getComponentProperty(MODULEREF_KEY);
+ collectionModule.add(moduleref);
+ }
+
+
+
/*
* (non-Javadoc)
*
- * @see org.apache.axis.description.ServiceDescription#getModuleList()
+ * @see org.apache.axis.description.ServiceDescription#getEngadgedModules()
*/
/**
- * Method getModuleList
+ * Method getEngadgedModules
*
* @return
*/
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java?rev=170910&r1=170909&r2=170910&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java Thu May 19 03:32:13 2005
@@ -17,6 +17,8 @@
import org.apache.axis.context.MessageContext;
import org.apache.axis.context.ServiceContext;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.phaseresolver.PhaseResolver;
import org.apache.wsdl.WSDLService;
import org.apache.wsdl.impl.WSDLServiceImpl;
@@ -63,12 +65,13 @@
*/
/**
- * Method addModule
- *
+ * To ebgage a module it is reuired to use this method
* @param moduleref
+ * @throws AxisFault
*/
- public void addModule(QName moduleref) {
- if (moduleref == null) {
+ public void engageModule(QName moduleref) throws AxisFault {
+ //TODO Fix me Deepal
+ if (moduleref == null) {
return;
}
Collection collectionModule = (Collection) this.getComponentProperty(MODULEREF_KEY);
@@ -78,15 +81,15 @@
/*
* (non-Javadoc)
*
- * @see org.apache.axis.description.ServiceDescription#getModuleList()
+ * @see org.apache.axis.description.ServiceDescription#getEngadgedModules()
*/
/**
- * Method getModuleList
+ * Method getEngadgedModules
*
* @return
*/
- public Collection getModules() {
+ public Collection getEngagedModules() {
return (Collection) this.getComponentProperty(MODULEREF_KEY);
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfiguration.java?rev=170910&r1=170909&r2=170910&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfiguration.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfiguration.java Thu May 19 03:32:13 2005
@@ -88,6 +88,13 @@
*/
public void addMdoule(ModuleDescription module) throws AxisFault;
+ /**
+ * To engae a module at the run time it can be used this method
+ * @param moduleref
+ * @throws AxisFault
+ */
+ public void engageModule(QName moduleref) throws AxisFault ;
+
/**
* Method getTransports
*
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java?rev=170910&r1=170909&r2=170910&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java Thu May 19 03:32:13 2005
@@ -17,6 +17,7 @@
import org.apache.axis.description.*;
import org.apache.axis.phaseresolver.PhaseMetadata;
+import org.apache.axis.phaseresolver.PhaseResolver;
import javax.xml.namespace.QName;
import java.util.*;
@@ -28,7 +29,7 @@
/**
* To store Erroness services
*/
- private Hashtable errornesServices;
+ private Hashtable errornesServices;
/**
* Field modules
@@ -56,14 +57,14 @@
private ArrayList outPhases;
private ArrayList inFaultPhases;
private ArrayList outFaultPhases;
-
+
private ArrayList inPhasesUptoAndIncludingPostDispatch;
private ArrayList faultPhases;
/////////////////////// From AxisGlobal /////////////////////////////////////
- /**
+ /**
* Field paramInclude
*/
protected final ParameterInclude paramInclude;
@@ -71,17 +72,16 @@
/**
* Field modules
*/
- protected final List modulesqNames;
+ protected final List engagedModules;
protected HashMap messagRecievers;
/////////////////////// From AxisGlobal /////////////////////////////////////
/**
* Constructor EngineRegistryImpl
- *
*/
public AxisSystemImpl() {
paramInclude = new ParameterIncludeImpl();
- modulesqNames = new ArrayList();
+ engagedModules = new ArrayList();
messagRecievers = new HashMap();
inPhases = new ArrayList();
@@ -89,14 +89,14 @@
inFaultPhases = new ArrayList();
outFaultPhases = new ArrayList();
errornesServices = new Hashtable();
-
+
inPhasesUptoAndIncludingPostDispatch = new ArrayList();
inPhasesUptoAndIncludingPostDispatch.add(new Phase(PhaseMetadata.PHASE_TRANSPORTIN));
inPhasesUptoAndIncludingPostDispatch.add(new Phase(PhaseMetadata.PHASE_PRE_DISPATCH));
- Phase dispatch = new Phase(PhaseMetadata.PHASE_DISPATCH);
- dispatch.addHandler(new RequestURIBasedDispatcher(),0);
- dispatch.addHandler(new AddressingBasedDispatcher(),1);
- inPhasesUptoAndIncludingPostDispatch.add(dispatch) ;
+ Phase dispatch = new Phase(PhaseMetadata.PHASE_DISPATCH);
+ dispatch.addHandler(new RequestURIBasedDispatcher(), 0);
+ dispatch.addHandler(new AddressingBasedDispatcher(), 1);
+ inPhasesUptoAndIncludingPostDispatch.add(dispatch);
inPhasesUptoAndIncludingPostDispatch.add(new Phase(PhaseMetadata.PHASE_POST_DISPATCH));
}
@@ -110,7 +110,7 @@
}
public Hashtable getFaulytServices() {
- return errornesServices;
+ return errornesServices;
}
/**
@@ -145,11 +145,10 @@
}
/**
- *
* @return
*/
- public HashMap getModules(){
- return modules;
+ public HashMap getModules() {
+ return modules;
}
@@ -175,8 +174,6 @@
}
-
-
public TransportInDescription getTransportIn(QName name) throws AxisFault {
return (TransportInDescription) transportsIn.get(name);
}
@@ -191,6 +188,7 @@
throws AxisFault {
transportsIn.put(transport.getName(), transport);
}
+
public TransportOutDescription getTransportOut(QName name) throws AxisFault {
return (TransportOutDescription) transportsOut.get(name);
}
@@ -236,20 +234,20 @@
this.outPhases = outPhases;
}
-
+
public ArrayList getInPhasesUptoAndIncludingPostDispatch() {
return inPhasesUptoAndIncludingPostDispatch;
}
+
public ArrayList getPhasesInOutFaultFlow() {
- return faultPhases;
- }
+ return faultPhases;
+ }
public ArrayList getOutFlow() {
return outPhases;
}
-
-
+
/**
* @return
*/
@@ -278,52 +276,49 @@
outFaultPhases = list;
}
- ////////////////////////// Form Axis Global
+ ////////////////////////// Form Axis Global
- public void addMessageReceiver(String key ,MessageReceiver messageReceiver){
- messagRecievers.put(key,messageReceiver) ;
+ public void addMessageReceiver(String key, MessageReceiver messageReceiver) {
+ messagRecievers.put(key, messageReceiver);
}
- public MessageReceiver getMessageReceiver(String key){
- return (MessageReceiver)messagRecievers.get(key);
+ public MessageReceiver getMessageReceiver(String key) {
+ return (MessageReceiver) messagRecievers.get(key);
}
/**
- * Method getParameter
- *
- * @param name
- * @return
- */
- public Parameter getParameter(String name) {
- return paramInclude.getParameter(name);
- }
-
- /**
- * Method addParameter
- *
- * @param param
- */
- public void addParameter(Parameter param) {
- paramInclude.addParameter(param);
- }
-
+ * Method getParameter
+ *
+ * @param name
+ * @return
+ */
+ public Parameter getParameter(String name) {
+ return paramInclude.getParameter(name);
+ }
/**
- * Method addModule
- *
- * @param moduleref
- */
- public void addModule(QName moduleref) {
- modulesqNames.add(moduleref);
- }
-
- /**
- * Method getModuleList
- *
- * @return
- */
- public Collection getModuleList() {
- return modulesqNames;
- }
+ * Method addParameter
+ *
+ * @param param
+ */
+ public void addParameter(Parameter param) {
+ paramInclude.addParameter(param);
+ }
+ /**
+ * Method getEngadgedModules
+ *
+ * @return
+ */
+ public Collection getEngadgedModules() {
+ return engagedModules;
+ }
+
+ public void engageModule(QName moduleref) throws AxisFault {
+ ModuleDescription module = getModule(moduleref);
+ if (module != null) {
+ new PhaseResolver(this).engageModuleGlobally(module);
+ }
+ engagedModules.add(moduleref);
+ }
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java?rev=170910&r1=170909&r2=170910&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java Thu May 19 03:32:13 2005
@@ -141,7 +141,7 @@
Flow flow = null;
///////////////////////////////////////////////////////////////////////////////////////////
////////////////////////// Handlers from server.xml from modules/////////////////////////
- ArrayList modulqnames = (ArrayList) ((AxisSystemImpl)axisConfig).getModuleList();
+ ArrayList modulqnames = (ArrayList) ((AxisSystemImpl)axisConfig).getEngadgedModules();
for (int i = 0; i < modulqnames.size(); i++) {
QName modulename = (QName) modulqnames.get(i);
module = axisConfig.getModule(modulename);
@@ -229,7 +229,7 @@
///////////////////////////////////////////////////////////////////////////////////////
///////////////////// SERVICE MODULE HANDLERS ////////////////////////////////////////////////
- Collection collection = axisService.getModules();
+ Collection collection = axisService.getEngagedModules();
Iterator itr = collection.iterator();
while (itr.hasNext()) {
QName moduleref = (QName) itr.next();
@@ -381,7 +381,7 @@
public ConfigurationContext buildGlobalChains()
throws AxisFault, PhaseException {
ConfigurationContext engineContext = new ConfigurationContext(axisConfig);
- List modules = (List) ((AxisSystemImpl)axisConfig).getModuleList();
+ List modules = (List) ((AxisSystemImpl)axisConfig).getEngadgedModules();
int count = modules.size();
QName moduleName;
ModuleDescription module;
@@ -456,5 +456,12 @@
}
}
return engineContext;
+ }
+
+
+
+
+ public void engageModuleGlobally(ModuleDescription module){
+
}
}
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java?rev=170910&r1=170909&r2=170910&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MessageWithServerTest.java Thu May 19 03:32:13 2005
@@ -66,7 +66,7 @@
ModuleDescription m1 = new ModuleDescription(new QName("", "A Mdoule 1"));
m1.setInFlow(new MockFlow("service module inflow", 4));
//m1.setFaultInFlow(new MockFlow("service module faultflow", 1));
- service.addModule(m1.getName());
+ service.engageModule(m1.getName());
OperationDescription operation = new OperationDescription(operationName);
service.addOperation(operation);