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/09/23 16:25:40 UTC
svn commit: r291126 - in
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2:
deployment/ description/ engine/ transport/http/
Author: deepal
Date: Fri Sep 23 07:25:30 2005
New Revision: 291126
URL: http://svn.apache.org/viewcvs?rev=291126&view=rev
Log:
fixing bugs in module configuration , parameter override problems
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java?rev=291126&r1=291125&r2=291126&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java Fri Sep 23 07:25:30 2005
@@ -232,11 +232,15 @@
//setting locking attribute
OMAttribute paraLocked = paramterElement.getAttribute(
new QName(ATTLOCKED));
+ Parameter parentpara = null;
+ if (parent !=null) {
+ parentpara = parent.getParameter(paramter.getName());
+ }
if (paraLocked !=null) {
String lockedValue = paraLocked.getValue();
if("true".equals(lockedValue)){
//if the parameter is locked at some levle paramer value replace by that
- if(parent.isParamterLocked(paramter.getName())){
+ if(parent!=null && parent.isParamterLocked(paramter.getName())){
throw new DeploymentException("The paramter " + paramter.getName() + " has" +
" locked at top levle can not overide");
} else{
@@ -248,7 +252,13 @@
}
}
try {
- parameterInclude.addParameter(paramter);
+ if(parent !=null){
+ if(parentpara == null | !parent.isParamterLocked(paramter.getName())){
+ parameterInclude.addParameter(paramter);
+ }
+ } else {
+ parameterInclude.addParameter(paramter);
+ }
} catch (AxisFault axisFault) {
throw new DeploymentException(axisFault);
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java?rev=291126&r1=291125&r2=291126&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java Fri Sep 23 07:25:30 2005
@@ -61,6 +61,7 @@
phasesInFaultFlow = new ArrayList();
phasesOutFaultFlow = new ArrayList();
modulerefs = new ArrayList();
+ moduleConfigmap = new HashMap();
}
public OperationDescription(QName name) {
@@ -405,9 +406,6 @@
* @param moduleConfiguration
*/
public void addModuleConfig(ModuleConfiguration moduleConfiguration){
- if(moduleConfigmap == null){
- moduleConfigmap = new HashMap();
- }
moduleConfigmap.put(moduleConfiguration.getModuleName(),moduleConfiguration);
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java?rev=291126&r1=291125&r2=291126&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java Fri Sep 23 07:25:30 2005
@@ -87,6 +87,7 @@
this.setComponentProperty(MODULEREF_KEY, new ArrayList());
this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
this.setServiceInterface(new WSDLInterfaceImpl());
+ moduleConfigmap = new HashMap();
}
public ServiceDescription() {
@@ -95,6 +96,7 @@
this.setComponentProperty(MODULEREF_KEY, new ArrayList());
this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
this.setServiceInterface(new WSDLInterfaceImpl());
+ moduleConfigmap = new HashMap();
}
/**
@@ -808,9 +810,6 @@
* @param moduleConfiguration
*/
public void addModuleConfig(ModuleConfiguration moduleConfiguration){
- if(moduleConfigmap == null){
- moduleConfigmap = new HashMap();
- }
moduleConfigmap.put(moduleConfiguration.getModuleName(),moduleConfiguration);
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java?rev=291126&r1=291125&r2=291126&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java Fri Sep 23 07:25:30 2005
@@ -118,6 +118,7 @@
* Constructor EngineRegistryImpl
*/
public AxisConfigurationImpl() {
+ moduleConfigmap = new HashMap();
paramInclude = new ParameterIncludeImpl();
engagedModules = new ArrayList();
messagReceivers = new HashMap();
@@ -559,9 +560,6 @@
* @param moduleConfiguration
*/
public void addModuleConfig(ModuleConfiguration moduleConfiguration){
- if(moduleConfigmap == null){
- moduleConfigmap = new HashMap();
- }
moduleConfigmap.put(moduleConfiguration.getModuleName(),moduleConfiguration);
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=291126&r1=291125&r2=291126&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Fri Sep 23 07:25:30 2005
@@ -520,7 +520,7 @@
* To serilze the entier context heirarachy to a given location from top to bottom
* @throws AxisFault
*/
- public synchronized void serialize() throws AxisFault{
+ public synchronized void serialize() {
try {
String serailzeLocaion =".";
//output location
@@ -532,10 +532,11 @@
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(engineContext);
} catch (FileNotFoundException e) {
- throw new AxisFault(e);
+ //todo has to be improved
} catch (IOException e) {
- throw new AxisFault(e);
+ //todo has to be improved
}
+
}
}
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=291126&r1=291125&r2=291126&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 Fri Sep 23 07:25:30 2005
@@ -186,15 +186,15 @@
req.getHeader(HTTPConstants.HEADER_SOAP_ACTION),
req.getRequestURL().toString(),
configContext);
-
+
Object contextWritten =
msgContext.getOperationContext().getProperty(Constants.RESPONSE_WRITTEN);
-
+
//Getting the
res.setContentType("text/xml; charset="+
msgContext
- .getProperty(MessageContext.CHARACTER_SET_ENCODING));
-
+ .getProperty(MessageContext.CHARACTER_SET_ENCODING));
+
if (contextWritten == null
|| !Constants.VALUE_TRUE.equals(contextWritten)) {
res.setStatus(HttpServletResponse.SC_ACCEPTED);
@@ -223,6 +223,11 @@
headerMap.put(key, value);
}
return headerMap;
+ }
+
+ public void destroy() {
+ super.destroy();
+ new AxisEngine(configContext).serialize();
}
}