Author: chinthaka
Date: Wed Aug 2 08:59:03 2006
New Revision: 428039
URL: http://svn.apache.org/viewvc?rev=428039&view=rev
Log:
SOAPBodyBasedDispatcher was not working for messages which have the name of the
wrapping element different from the operation name. This includes a fix for
that.
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=428039&r1=428038&r2=428039&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 Aug 2 08:59:03 2006
@@ -344,7 +344,27 @@
axisOperation.setSoapAction("urn:" +
axisOperation.getName().getLocalPart());
}
addChild(axisOperation);
- operationsAliasesMap.put(axisOperation.getName().getLocalPart(),
axisOperation);
+
+ String operationName = axisOperation.getName().getLocalPart();
+
+ /*
+ Some times name of the operation can be different from the name of
the first child of the SOAPBody.
+ This will put the correct mapping associating that name with the
operation. This will be useful especially for
+ the SOAPBodyBasedDispatcher
+ */
+
+ Iterator axisMessageIter = axisOperation.getChildren();
+ AxisMessage axisMessage;
+
+ while (axisMessageIter.hasNext()) {
+ axisMessage = (AxisMessage) axisMessageIter.next();
+ String messageName = axisMessage.getName();
+ if (messageName != null && !messageName.equals(operationName)) {
+ operationsAliasesMap.put(messageName, axisOperation);
+ }
+ }
+
+ operationsAliasesMap.put(operationName, axisOperation);
String action = axisOperation.getSoapAction();
if (action.length() > 0) {
operationsAliasesMap.put(action, axisOperation);
@@ -760,6 +780,7 @@
return axisOperation;
}
+
/**
* Returns the AxisOperation which has been mapped to the given action.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]