summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java
diff options
context:
space:
mode:
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.java26
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;
+ }
}
}
}