tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scottk...@apache.org
Subject svn commit: r1209512 - /tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java
Date Fri, 02 Dec 2011 14:36:06 GMT
Author: scottkurz
Date: Fri Dec  2 14:36:06 2011
New Revision: 1209512

URL: http://svn.apache.org/viewvc?rev=1209512&view=rev
Log:
Add wsa:IsReferenceParameter='true' attr to ReferenceParameters header per WS-A SOAP Binding
spec.

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java?rev=1209512&r1=1209511&r2=1209512&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java
Fri Dec  2 14:36:06 2011
@@ -35,6 +35,7 @@ import org.apache.axiom.om.OMAbstractFac
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -378,10 +379,13 @@ public class Axis2ReferenceBindingInvoke
         // Deal with Reference Parameters, if present - copy to the header without the wsa:ReferenceParameters
wrapper
         OMElement refParms = (OMElement) msg.getHeaders().get(WS_REF_PARMS);
         if( refParms != null ) {
-        	Iterator<?> children = refParms.getChildren();
+        	Iterator<OMElement> children = refParms.getChildElements();
         	while( children.hasNext() ) {
-        		OMNode node = (OMNode) children.next();
-        		sh.addChild(node);
+        	        OMElement child = children.next();
+        		OMNamespace wsaNamespace = sh.getOMFactory().createOMNamespace(AddressingConstants.Final.WSA_NAMESPACE,
"wsa");
+        		OMAttribute isRefParm = sh.getOMFactory().createOMAttribute(AddressingConstants.Final.WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE,
wsaNamespace, "true");
+        		child.addAttribute(isRefParm);
+        		sh.addChild(child);    
         	}
         } // end if 
         



Mime
View raw message