Correct code thats tryng to get at the root element local name so that it works

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@984847 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
antelder 2010-08-12 16:12:49 +00:00
commit 89da32c4e5

View file

@ -121,11 +121,14 @@ public class OperationSelectorJMSDefaultServiceInterceptor implements Intercepto
if (xmlPayload != null) {
rootElement = domHelper.load(xmlPayload);
operationFromPayload = rootElement.getLocalName();
for (Operation op : serviceOperations) {
if (op.getName().equals(operationFromPayload)) {
operation = op;
break;
Node firstChild = rootElement.getFirstChild();
if (firstChild != null) {
operationFromPayload = firstChild.getLocalName();
for (Operation op : serviceOperations) {
if (op.getName().equals(operationFromPayload)) {
operation = op;
break;
}
}
}
}
@ -137,11 +140,14 @@ public class OperationSelectorJMSDefaultServiceInterceptor implements Intercepto
if (bytes != null) {
rootElement = domHelper.load(new String(bytes));
operationFromPayload = rootElement.getLocalName();
for (Operation op : serviceOperations) {
if (op.getName().equals(operationFromPayload)) {
operation = op;
break;
Node firstChild = rootElement.getFirstChild();
if (firstChild != null) {
operationFromPayload = firstChild.getLocalName();
for (Operation op : serviceOperations) {
if (op.getName().equals(operationFromPayload)) {
operation = op;
break;
}
}
}
}