You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mi...@apache.org on 2008/07/09 01:06:22 UTC

svn commit: r675033 - /ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java

Author: midon
Date: Tue Jul  8 16:06:22 2008
New Revision: 675033

URL: http://svn.apache.org/viewvc?rev=675033&view=rev
Log:
use replaceContent when header value is a TextNode

Modified:
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java?rev=675033&r1=675032&r2=675033&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java Tue Jul  8 16:06:22 2008
@@ -397,14 +397,13 @@
                         rvalue = ((Document)rvalue).getDocumentElement();
                 }
 
-                if (headerAssign && lvaluePtr.getParentNode().getNodeName().equals("message")) {
-                    lvalue = copyInto((Element)lvalue, (Element) lvaluePtr, rvalue);
+                if (headerAssign && lvaluePtr.getParentNode().getNodeName().equals("message") && rvalue.getNodeType()==Node.ELEMENT_NODE) {
+                    lvalue = copyInto((Element)lvalue, (Element) lvaluePtr, (Element) rvalue);
                 } else if (rvalue.getNodeType() == Node.ELEMENT_NODE && lvaluePtr.getNodeType() == Node.ELEMENT_NODE) {
                     lvalue = replaceElement((Element)lvalue, (Element) lvaluePtr, (Element) rvalue,
                             ocopy.keepSrcElementName);
                 } else {
-                    lvalue = replaceContent(lvalue, lvaluePtr, rvalue
-                            .getTextContent());
+                    lvalue = replaceContent(lvalue, lvaluePtr, rvalue.getTextContent());
                 }
                 final VariableInstance lval = _scopeFrame.resolve(ocopy.to.getVariable());
                 if (__log.isDebugEnabled())
@@ -464,7 +463,7 @@
         return (lval == ptr) ? replacement :  lval;
     }
 
-    private Element copyInto(Element lval, Element ptr, Node src) {
+    private Element copyInto(Element lval, Element ptr, Element src) {
         ptr.appendChild(ptr.getOwnerDocument().importNode(src, true));
         return lval;
     }