I'm running into a problem encrypting (abritrary) message parts, using
my own DOM/SAAJ implementation. I am finding that when signing a
message (part), the EnvelopIdResolver is not properly finding the wsu:Id
attribute that is on the signed element.
I think I've tracked it down to a call to the DOM Element getAttribute
operation -- we are making a non-namespace-qualified call on the
element, whereas (I think) our call should qualify the getAttribute(NS)
call with the WSU URI, along the lines of:
e> svn diff EnvelopeIdResolver.java
Index: EnvelopeIdResolver.java
===================================================================
--- EnvelopeIdResolver.java (revision 410901)
+++ EnvelopeIdResolver.java (working copy)
@@ -115,7 +115,7 @@
if (!id.equals(cId)) {
cId = null;
if ((selectedElem = WSSecurityUtil.getElementByWsuId(doc,
uriNodeValue)) != null) {
- cId = selectedElem.getAttribute("Id");
+ cId = selectedElem.getAttributeNS(WSConstants.WSU_NS, "Id");
} else if ((selectedElem = WSSecurityUtil.getElementByGenId(doc,
uriNodeValue)) != null) {
cId = selectedElem.getAttribute("Id");
}
Any opinions? What are the DOM semantics of getAttribute(localname),
when the attribute is namespace-qualified?
I can file a bug, and submit a formal patch, if desired.
Thanks,
-Fred
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]