tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r984847 - /tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java
Date Thu, 12 Aug 2010 16:12:49 GMT
Author: antelder
Date: Thu Aug 12 16:12:49 2010
New Revision: 984847

URL: http://svn.apache.org/viewvc?rev=984847&view=rev
Log:
Correct code thats tryng to get at the root element local name so that it works

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java?rev=984847&r1=984846&r2=984847&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/runtime/OperationSelectorJMSDefaultServiceInterceptor.java
Thu Aug 12 16:12:49 2010
@@ -121,11 +121,14 @@ public class OperationSelectorJMSDefault
 
                     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 OperationSelectorJMSDefault
 
                     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;
+                                }
                             }
                         }
                     }



Mime
View raw message