diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-12 16:12:49 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-12 16:12:49 +0000 |
commit | 89da32c4e5c5705dcc507d4b43a646c625852380 (patch) | |
tree | c4d111bb703abc71797bec92cb170c3ed7ded653 /sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java | |
parent | 7994b2eb5cc14f9218b595bbb9efca3d01e4226c (diff) |
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
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java index 149d1c6b4b..e12850c41c 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java @@ -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; + } } } } |