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/10/26 11:34:49 UTC
svn commit: r328610 - in
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2:
deployment/DescriptionBuilder.java deployment/ModuleBuilder.java
deployment/ServiceBuilder.java description/AxisOperation.java
description/AxisService.java
Author: deepal
Date: Wed Oct 26 02:34:36 2005
New Revision: 328610
URL: http://svn.apache.org/viewcvs?rev=328610&view=rev
Log:
When there are multiple wsamapping inside an operation , it has only added the first one , so I fixed that (Thanks Chamikra finding the error)
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.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=328610&r1=328609&r2=328610&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 Wed Oct 26 02:34:36 2005
@@ -17,6 +17,7 @@
package org.apache.axis2.deployment;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.Flow;
import org.apache.axis2.description.FlowImpl;
@@ -40,6 +41,8 @@
import javax.xml.stream.XMLStreamReader;
import java.io.InputStream;
import java.util.Iterator;
+import java.util.ArrayList;
+
/**
* To do the common tasks for all *Builder class
*/
@@ -173,10 +176,13 @@
* @param paramters <code>Parameter</code>
* @param parameterInclude <code>ParameterInclude</code>
* @param parent <code>ParameterInclude</code>
+ * return : will retuen paramters , wchih name is WSA-Mapping , since we need to treat them
+ * seperately
*/
- protected void processParameters(Iterator paramters, ParameterInclude parameterInclude,
- ParameterInclude parent )
+ protected ArrayList processParameters(Iterator paramters, ParameterInclude parameterInclude,
+ ParameterInclude parent )
throws DeploymentException {
+ ArrayList wsamapping = new ArrayList();
while (paramters.hasNext()) {
//this is to check whether some one has locked the parmter at the top level
OMElement paramterElement = (OMElement) paramters.next();
@@ -227,6 +233,11 @@
paramter.setLocked(false);
}
}
+ if(Constants.WSA_ACTION.equals(paraName.getAttributeValue())){
+ wsamapping.add(paramter);
+ // no need to add this paramter , since this is just for mapping
+ continue;
+ }
try {
if(parent !=null){
if(parentpara == null | !parent.isParamterLocked(paramter.getName())){
@@ -239,6 +250,7 @@
throw new DeploymentException(axisFault);
}
}
+ return wsamapping;
}
@@ -261,7 +273,7 @@
}
}catch (AxisFault axisFault) {
throw new DeploymentException(Messages.getMessage(
- DeploymentErrorMsgs.MODEULE_NOT_FOUND, axisFault.getMessage()));
+ DeploymentErrorMsgs.MODEULE_NOT_FOUND, axisFault.getMessage()));
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java?rev=328610&r1=328609&r2=328610&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java Wed Oct 26 02:34:36 2005
@@ -145,7 +145,7 @@
OMAttribute op_mep_att = operation.getAttribute(
new QName(MEP));
String mepURL =null;
- AxisOperation op_descrip;
+ AxisOperation op_descrip;
if(op_mep_att !=null){
mepURL= op_mep_att.getAttributeValue();
}
@@ -158,7 +158,7 @@
op_descrip = AxisOperationFactory.getOperetionDescription(mepURL);
} catch (AxisFault axisFault) {
throw new DeploymentException(Messages.getMessage(Messages.getMessage(
- DeploymentErrorMsgs.OPERATION_PROCESS_ERROR,axisFault.getMessage())));
+ DeploymentErrorMsgs.OPERATION_PROCESS_ERROR,axisFault.getMessage())));
}
}
String opname = op_name_att.getAttributeValue();
@@ -168,7 +168,8 @@
//Opeartion Paramters
Iterator paramters = operation.getChildrenWithName(
new QName(PARAMETERST));
- processParameters(paramters,op_descrip,module);
+ ArrayList wsamapping = processParameters(paramters,op_descrip,module);
+ op_descrip.setWsamappingList(wsamapping);
//setting the mep of the operation
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=328610&r1=328609&r2=328610&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java Wed Oct 26 02:34:36 2005
@@ -128,14 +128,10 @@
ArrayList ops = processOpeartions(opeartinsItr);
for (int i = 0; i < ops.size(); i++) {
AxisOperation opeartionDesc = (AxisOperation) ops.get(i);
- ArrayList paramters = opeartionDesc.getParameters();
-
- // Adding wsa-maping into service
- for (int j = 0; j < paramters.size(); j++) {
- Parameter parameter = (Parameter) paramters.get(j);
- if(parameter.getName().equals(Constants.WSA_ACTION)){
- service.addMapping((String)parameter.getValue(),opeartionDesc);
- }
+ ArrayList wsamappings = opeartionDesc.getWsamappingList();
+ for (int j = 0; j < wsamappings.size(); j++) {
+ Parameter paramter = (Parameter) wsamappings.get(j);
+ service.addMapping((String)paramter.getValue(),opeartionDesc);
}
service.addOperation(opeartionDesc);
}
@@ -207,8 +203,8 @@
//Opeartion Paramters
Iterator paramters = operation.getChildrenWithName(
new QName(PARAMETERST));
- processParameters(paramters,op_descrip,service);
-
+ ArrayList wsamappings = processParameters(paramters,op_descrip,service);
+ op_descrip.setWsamappingList(wsamappings);
// loading the message receivers
OMElement receiverElement = operation.getFirstChildWithName(
new QName(MESSAGERECEIVER));
@@ -251,7 +247,7 @@
OMAttribute moduleName_att = moduleConfig.getAttribute(
new QName(ATTNAME));
if(moduleName_att == null){
- throw new DeploymentException(Messages.getMessage(
+ throw new DeploymentException(Messages.getMessage(
DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
} else {
String module = moduleName_att.getAttributeValue();
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java?rev=328610&r1=328609&r2=328610&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java Wed Oct 26 02:34:36 2005
@@ -64,6 +64,7 @@
private WSDLOperationImpl wsdlopeartion;
private AxisService parent;
+ private ArrayList wsamappingList;
//To store deploytime module refs
private ArrayList modulerefs;
@@ -581,5 +582,13 @@
public void setWsdlopeartion(WSDLOperationImpl wsdlopeartion) {
this.wsdlopeartion = wsdlopeartion;
+ }
+
+ public ArrayList getWsamappingList() {
+ return wsamappingList;
+ }
+
+ public void setWsamappingList(ArrayList wsamappingList) {
+ this.wsamappingList = wsamappingList;
}
}
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=328610&r1=328609&r2=328610&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 Wed Oct 26 02:34:36 2005
@@ -95,7 +95,7 @@
this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
this.setServiceInterface(new WSDLInterfaceImpl());
moduleConfigmap = new HashMap();
-
+
}
public AxisService() {
@@ -165,13 +165,10 @@
for (Iterator iterator = col.iterator(); iterator.hasNext();) {
AxisOperation axisOperation = (AxisOperation) iterator.next();
- ArrayList paramters = axisOperation.getParameters();
- // Adding wsa-maping into service
- for (int j = 0; j < paramters.size(); j++) {
- Parameter parameter = (Parameter) paramters.get(j);
- if(parameter.getName().equals(Constants.WSA_ACTION)){
- this.addMapping((String)parameter.getValue(),axisOperation);
- }
+ ArrayList wsamappings = axisOperation.getWsamappingList();
+ for (int j = 0; j < wsamappings.size(); j++) {
+ Parameter paramter = (Parameter) wsamappings.get(j);
+ this.addMapping((String)paramter.getValue(),axisOperation);
}
pr.buildModuleOperation(axisOperation);
this.addOperation(axisOperation);
@@ -565,7 +562,7 @@
* otherwise will return null.
*/
public AxisOperation getOperationBySOAPAction(String soapAction,
- QName endpoint) {
+ QName endpoint) {
HashMap bindingOperations = this.getEndpoint(endpoint).getBinding()
.getBindingOperations();
Iterator operationKeySetIterator = bindingOperations.keySet().iterator();