summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main
diff options
context:
space:
mode:
authorscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-12-02 14:36:06 +0000
committerscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-12-02 14:36:06 +0000
commitd8b81eed1043021574ce61618b91ead493ba4226 (patch)
treea2dc39acc59d66449830503ba98a1d73d4eb3c23 /sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main
parentb54a72a32f5f98ebc4688f298744a97185ceb9db (diff)
Add wsa:IsReferenceParameter='true' attr to ReferenceParameters header per WS-A SOAP Binding spec.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1209512 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java
index 4397dfaa10..488de5a769 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java
@@ -35,6 +35,7 @@ import org.apache.axiom.om.OMAbstractFactory;
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 Axis2ReferenceBindingInvoker implements Invoker {
// 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