Author: objectiser
Date: 2010-10-18 05:20:34 -0400 (Mon, 18 Oct 2010)
New Revision: 1042
Modified:
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java
Log:
Updated to wrap the assertion in a wsse:Security element.
Modified:
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java
===================================================================
---
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java 2010-10-15
11:52:25 UTC (rev 1041)
+++
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java 2010-10-18
09:20:34 UTC (rev 1042)
@@ -234,8 +234,21 @@
try {
java.util.Map<String,Element> headerParts=
new java.util.HashMap<String, Element>();
- headerParts.put(requestSAMLAssertionPartName, samlCred.getAssertionAsElement());
+ // Wrap assertion element in a wsse:Security element
+ org.w3c.dom.Element assertion=samlCred.getAssertionAsElement();
+ org.w3c.dom.Document doc=assertion.getOwnerDocument();
+
+ org.w3c.dom.Element security=doc.createElementNS(
+ "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
+ "Security");
+
+ security.appendChild(assertion.cloneNode(true));
+
+ //doc.appendChild(security);
+
+ headerParts.put(requestSAMLAssertionPartName, security);
+
invocationContext.setRequestHeaderParts(headerParts);
} catch(Throwable t) {
logger.error("Failed to add header parts", t);
Show replies by date