<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-269</id>
	<title>Nabble - Apache XML - Security - Dev</title>
	<updated>2008-10-05T21:16:54Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Apache-XML---Security---Dev-f269.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Apache-XML---Security---Dev-f269.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-19831764</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-10-05T21:16:54Z</published>
	<updated>2008-10-05T21:16:54Z</updated>
	<author>
		<name>Scott Cantor</name>
	</author>
	<content type="html">&amp;gt; Granted that it's insane (and I appreciate your opinion about this) is it
&lt;br&gt;&amp;gt; *documented* insanity, or is it defined by implementation? From my limited
&lt;br&gt;&amp;gt; reading, it seems to be a very grey area. The c14n documentation doesn't
&lt;br&gt;&amp;gt; mention the DOM at all, but there may be some documentation on the DOM
&lt;br&gt;side
&lt;br&gt;&amp;gt; that I'm unaware of.
&lt;br&gt;&lt;br&gt;It's not documented any *other* way, that's kind of the only way to say it.
&lt;br&gt;If you follow the text, you find that when handing a c14n engine a DOM
&lt;br&gt;element (and an implied node set of everything below it), nothing in the
&lt;br&gt;spec says to create a namespace declaration if one isn't already present.
&lt;br&gt;The lone exception is the InclusivePrefixes list.
&lt;br&gt;&lt;br&gt;So if it's not declared, it won't get declared, and the XML that results
&lt;br&gt;won't be well-formed (and therefore probably isn't what you meant to sign).
&lt;br&gt;&lt;br&gt;Serializers are not the same as a c14n engine, and it isn't typical to use
&lt;br&gt;one before you sign a DOM, so using serializers to &amp;quot;fix up&amp;quot; namespaces is
&lt;br&gt;really not part of a robust signing application.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19831764.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19830062</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-10-05T16:15:32Z</published>
	<updated>2008-10-05T16:15:32Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Scott Cantor wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;&amp;gt; Aside from the embarrassment though, it remains the case that the
&lt;br&gt;&amp;gt; serializer does not need the assistance of setAttributeNS; it does this
&lt;br&gt;&amp;gt; job itself.
&lt;br&gt;&lt;br&gt;There's no such thing as &amp;quot;the serializer&amp;quot;. There are hundreds of things called &amp;quot;serializers&amp;quot;. DOM3 includes an LS interface that includes &amp;quot;a serializer&amp;quot;, but that's just one example.
&lt;br&gt;&lt;br&gt;Every serializer has its own properties and behaviors, usually close to undocumented, so relying on that isn't robust.
&lt;br&gt;&lt;br&gt;Furthermore, signing takes place in many cases over a DOM, not a serialized document. It is not tenable to create the DOM, serialize it, parse it back in, and then sign it. So you have to ensure namespace correctness in the DOM itself using your own code (or a toolkit designed to address that).
&lt;br&gt;&lt;br&gt;The point is, you can't punt this in the manner you described. You may find that insane, but I find that most people conclude that about XML pretty quickly.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Granted that it's insane (and I appreciate your opinion about this) is it *documented* insanity, or is it defined by implementation? From my limited reading, it seems to be a very grey area. The c14n documentation doesn't mention the DOM at all, but there may be some documentation on the DOM side that I'm unaware of.</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19830062.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19829438</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-10-05T14:42:07Z</published>
	<updated>2008-10-05T14:42:07Z</updated>
	<author>
		<name>Scott Cantor</name>
	</author>
	<content type="html">&amp;gt; Aside from the embarrassment though, it remains the case that the
&lt;br&gt;&amp;gt; serializer does not need the assistance of setAttributeNS; it does this
&lt;br&gt;&amp;gt; job itself.
&lt;br&gt;&lt;br&gt;There's no such thing as &amp;quot;the serializer&amp;quot;. There are hundreds of things called &amp;quot;serializers&amp;quot;. DOM3 includes an LS interface that includes &amp;quot;a serializer&amp;quot;, but that's just one example.
&lt;br&gt;&lt;br&gt;Every serializer has its own properties and behaviors, usually close to undocumented, so relying on that isn't robust.
&lt;br&gt;&lt;br&gt;Furthermore, signing takes place in many cases over a DOM, not a serialized document. It is not tenable to create the DOM, serialize it, parse it back in, and then sign it. So you have to ensure namespace correctness in the DOM itself using your own code (or a toolkit designed to address that).
&lt;br&gt;&lt;br&gt;The point is, you can't punt this in the manner you described. You may find that insane, but I find that most people conclude that about XML pretty quickly.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19829438.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19825361</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-05T08:00:49Z</published>
	<updated>2008-10-05T08:00:49Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">Peter B. West schrieb:
&lt;br&gt;&amp;lt;SNIP ---- SNAP&amp;gt;
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Werner,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It helped a great deal. I'm embarrassed at my misreading of the API.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I forgot about the xmlns *namespace* itself, possibly because
&lt;br&gt;&amp;gt; createElementNS has no need for its explicit expression.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Aside from the embarrassment though, it remains the case that the
&lt;br&gt;&amp;gt; serializer does not need the assistance of setAttributeNS; it does this
&lt;br&gt;&amp;gt; job itself. Is that unreasonable? What other interpretation of
&lt;br&gt;&amp;gt; createElementNS is possible?
&lt;/div&gt;&lt;br&gt;I have no idea what a serializer does - however, the c14n serializer
&lt;br&gt;does not include the xmlns:ds=&amp;quot;....&amp;quot; attribute if it is not present
&lt;br&gt;at the element. If you the try to parse the resulting XML doc the
&lt;br&gt;parser complains regarding &amp;quot;namespace prefix not bound&amp;quot; (or something
&lt;br&gt;simliar).
&lt;br&gt;&lt;br&gt;See the discussins I hat with Scott and Raul because of a modification
&lt;br&gt;in xmlsec-1.4.2 where the KeyInfo object (element) was modified to omit
&lt;br&gt;the namespace declaration for the ds: prefix. Which resulted in problems.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Peter
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19825361.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19823321</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-05T03:42:16Z</published>
	<updated>2008-10-05T03:42:16Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">Werner Dittmann wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Peter B. West schrieb:
&lt;br&gt;&amp;gt; &amp;lt;SNIP ----- SNAP&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; you're using namespaces.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; setAttributeNS doesn't work for me following createElementNS. I get
&lt;br&gt;&amp;gt;&amp;gt; org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or
&lt;br&gt;&amp;gt;&amp;gt; change an object in a way which is incorrect with regard to namespaces.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This makes sense, but means that the only way to get the xmlns attribute
&lt;br&gt;&amp;gt;&amp;gt; expressed is to normalizeDocument(). My feeling is that this reinforces
&lt;br&gt;&amp;gt;&amp;gt; my point about the expected behaviour of the serializer.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Does it work for you? Maybe I'm doing something wrong.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Here a code snippet how this set attribute stuff works (at least for me
&lt;br&gt;&amp;gt; :-) ),
&lt;br&gt;&amp;gt; also some explanations why the namespace stuff works that way in DOM.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As an example the following element:
&lt;br&gt;&amp;gt; - a Reference element that is part of some OASIS WSS namespace (not the
&lt;br&gt;&amp;gt; same as
&lt;br&gt;&amp;gt; &amp;nbsp; Reference in Signature)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - the element also contains an attribute in another WSS namespace
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Example:
&lt;br&gt;&amp;gt; &amp;lt;wsse:Reference
&lt;br&gt;&amp;gt; xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; wsu:Id=&amp;quot;someIdentifier&amp;quot;
&lt;br&gt;&amp;gt; xmlns:wsu=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; &amp;lt;/wsse:Reference&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Create the element first:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Element element = doc.createElementNS(WSConstants.WSSE_NS,
&lt;br&gt;&amp;gt; &amp;quot;wsse:Reference&amp;quot;);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; this creates a namespace qualified element whose namespace is
&lt;br&gt;&amp;gt; &amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; (this is the value of the string constant &amp;quot;WSConstants.WSSE_NS&amp;quot;).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Please note that wsse:Reference is the element's qualified name
&lt;br&gt;&amp;gt; (Qname), &amp;nbsp;which
&lt;br&gt;&amp;gt; may consist of &amp;quot;prefix:local name&amp;quot; or &amp;quot;local name&amp;quot; alone (refer to W3C
&lt;br&gt;&amp;gt; namespace
&lt;br&gt;&amp;gt; specification).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Why using the namespace URI when creating the element? Refer to the
&lt;br&gt;&amp;gt; following
&lt;br&gt;&amp;gt; sentences given in W3C's namespace spec:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;lt;quote&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;The Prefix provides the namespace prefix part of the qualified name,
&lt;br&gt;&amp;gt; and MUST be
&lt;br&gt;&amp;gt; &amp;nbsp;associated with a namespace URI reference in a namespace declaration.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;Note that the prefix functions only as a placeholder for a namespace name.
&lt;br&gt;&amp;gt; &amp;nbsp;Applications SHOULD use the namespace name, not the prefix, in
&lt;br&gt;&amp;gt; constructing
&lt;br&gt;&amp;gt; &amp;nbsp;names whose scope extends beyond the containing document.
&lt;br&gt;&amp;gt; &amp;lt;/quote&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This says: the prefix is a convenience (IMHO meant for &amp;quot;humans&amp;quot;, not
&lt;br&gt;&amp;gt; necessarily for
&lt;br&gt;&amp;gt; computers :-) ). The real namespace is attached to the element.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Next step is to bind the prefix with a namespace using a namespace
&lt;br&gt;&amp;gt; declaration:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; element.setAttributeNS(WSConstants.XMLNS_NS, &amp;quot;xmlns:wsse&amp;quot;,
&lt;br&gt;&amp;gt; WSConstants.WSSE_NS);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The namespace declaration attribute:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - &amp;quot;WSConstants.XMLNS_NS&amp;quot; is the string
&lt;br&gt;&amp;gt; &amp;quot;&lt;a href=&quot;http://www.w3.org/XML/1998/namespace&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/XML/1998/namespace&lt;/a&gt;&amp;quot; which
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;is fixed and MUST be given this way. This creates an namespace
&lt;br&gt;&amp;gt; qualified attribute
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;whose namespace is &amp;quot;&lt;a href=&quot;http://www.w3.org/XML/1998/namespace&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/XML/1998/namespace&lt;/a&gt;&amp;quot;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - &amp;quot;xmlns:wsse&amp;quot; is the name of the attribute. Only the substring &amp;quot;xmlns:&amp;quot;
&lt;br&gt;&amp;gt; defines this
&lt;br&gt;&amp;gt; &amp;nbsp; attribute as a namespace declaration
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - the namespace URI of the element, for example
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; in case of Web Service Security extensions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Now the namespace qualified attribute of the above element:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; element.setAttributeNS(WSConstants.WSU_NS, wsu:Id&amp;quot;, id);
&lt;br&gt;&amp;gt; element.setAttributeNS(WSConstants.XMLNS_NS, &amp;quot;xmlns:wsu&amp;quot;,
&lt;br&gt;&amp;gt; WSConstants.WSU_NS);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hope this helped a bit :-) .
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Werner
&lt;/div&gt;&lt;br&gt;Werner,
&lt;br&gt;&lt;br&gt;It helped a great deal. I'm embarrassed at my misreading of the API.
&lt;br&gt;&lt;br&gt;I forgot about the xmlns *namespace* itself, possibly because
&lt;br&gt;createElementNS has no need for its explicit expression.
&lt;br&gt;&lt;br&gt;Aside from the embarrassment though, it remains the case that the
&lt;br&gt;serializer does not need the assistance of setAttributeNS; it does this
&lt;br&gt;job itself. Is that unreasonable? What other interpretation of
&lt;br&gt;createElementNS is possible?
&lt;br&gt;&lt;br&gt;Peter
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;my:name xmlns:my=&amp;quot;a:b:c&amp;quot; xmlns:my=&amp;quot;a:b:b&amp;quot;/&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm pretty sure that's because of your bug, using a DOM1 call to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; create that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; initial attribute.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm not sure when this arrangement of the namespace and attribute
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; occurs,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; but the ordering may be affected by the order of creation -
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; createElementNS
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; first, followed by the attribute setup. In any case, I don't know
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; what the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; canonicalizer would do with this. Neither do I know which xmlns:my
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; would
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; win
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; when the stream is read next time.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Neither will because that XML isn't well-formed. It won't parse.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Try using setAttributeNS and I think you'll have more luck.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -- Scott
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Peter B. West &amp;lt;&lt;a href=&quot;http://cv.pbw.id.au/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cv.pbw.id.au/&lt;/a&gt;&amp;gt;
&lt;br&gt;Folio &amp;lt;&lt;a href=&quot;http://defoe.sourceforge.net/folio/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://defoe.sourceforge.net/folio/&lt;/a&gt;&amp;gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19823321.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19821418</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-05T00:41:40Z</published>
	<updated>2008-10-05T00:41:40Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">Peter B. West schrieb:
&lt;br&gt;&amp;lt;SNIP ----- SNAP&amp;gt;
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; you're using namespaces.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; setAttributeNS doesn't work for me following createElementNS. I get
&lt;br&gt;&amp;gt; org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or
&lt;br&gt;&amp;gt; change an object in a way which is incorrect with regard to namespaces.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This makes sense, but means that the only way to get the xmlns attribute
&lt;br&gt;&amp;gt; expressed is to normalizeDocument(). My feeling is that this reinforces
&lt;br&gt;&amp;gt; my point about the expected behaviour of the serializer.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Does it work for you? Maybe I'm doing something wrong.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Here a code snippet how this set attribute stuff works (at least for me :-) ),
&lt;br&gt;also some explanations why the namespace stuff works that way in DOM.
&lt;br&gt;&lt;br&gt;As an example the following element:
&lt;br&gt;- a Reference element that is part of some OASIS WSS namespace (not the same as
&lt;br&gt;&amp;nbsp; &amp;nbsp;Reference in Signature)
&lt;br&gt;&lt;br&gt;- the element also contains an attribute in another WSS namespace
&lt;br&gt;&lt;br&gt;Example:
&lt;br&gt;&amp;lt;wsse:Reference xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wsu:Id=&amp;quot;someIdentifier&amp;quot; xmlns:wsu=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;...
&lt;br&gt;&amp;lt;/wsse:Reference&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Create the element first:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Element element = doc.createElementNS(WSConstants.WSSE_NS, &amp;quot;wsse:Reference&amp;quot;);
&lt;br&gt;&lt;br&gt;this creates a namespace qualified element whose namespace is
&lt;br&gt;&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;
&lt;br&gt;(this is the value of the string constant &amp;quot;WSConstants.WSSE_NS&amp;quot;).
&lt;br&gt;&lt;br&gt;Please note that wsse:Reference is the element's qualified name (Qname), &amp;nbsp;which
&lt;br&gt;may consist of &amp;quot;prefix:local name&amp;quot; or &amp;quot;local name&amp;quot; alone (refer to W3C namespace
&lt;br&gt;specification).
&lt;br&gt;&lt;br&gt;Why using the namespace URI when creating the element? Refer to the following
&lt;br&gt;sentences given in W3C's namespace spec:
&lt;br&gt;&lt;br&gt;&amp;lt;quote&amp;gt;
&lt;br&gt;&amp;nbsp; The Prefix provides the namespace prefix part of the qualified name, and MUST be
&lt;br&gt;&amp;nbsp; associated with a namespace URI reference in a namespace declaration.
&lt;br&gt;&lt;br&gt;&amp;nbsp; Note that the prefix functions only as a placeholder for a namespace name.
&lt;br&gt;&amp;nbsp; Applications SHOULD use the namespace name, not the prefix, in constructing
&lt;br&gt;&amp;nbsp; names whose scope extends beyond the containing document.
&lt;br&gt;&amp;lt;/quote&amp;gt;
&lt;br&gt;&lt;br&gt;This says: the prefix is a convenience (IMHO meant for &amp;quot;humans&amp;quot;, not necessarily for
&lt;br&gt;computers :-) ). The real namespace is attached to the element.
&lt;br&gt;&lt;br&gt;Next step is to bind the prefix with a namespace using a namespace declaration:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;element.setAttributeNS(WSConstants.XMLNS_NS, &amp;quot;xmlns:wsse&amp;quot;, WSConstants.WSSE_NS);
&lt;br&gt;&lt;br&gt;The namespace declaration attribute:
&lt;br&gt;&lt;br&gt;- &amp;quot;WSConstants.XMLNS_NS&amp;quot; is the string &amp;quot;&lt;a href=&quot;http://www.w3.org/XML/1998/namespace&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/XML/1998/namespace&lt;/a&gt;&amp;quot; which
&lt;br&gt;&amp;nbsp; &amp;nbsp; is fixed and MUST be given this way. This creates an namespace qualified attribute
&lt;br&gt;&amp;nbsp; &amp;nbsp; whose namespace is &amp;quot;&lt;a href=&quot;http://www.w3.org/XML/1998/namespace&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/XML/1998/namespace&lt;/a&gt;&amp;quot;.
&lt;br&gt;&lt;br&gt;- &amp;quot;xmlns:wsse&amp;quot; is the name of the attribute. Only the substring &amp;quot;xmlns:&amp;quot; defines this
&lt;br&gt;&amp;nbsp; &amp;nbsp;attribute as a namespace declaration
&lt;br&gt;&lt;br&gt;- the namespace URI of the element, for example
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp;in case of Web Service Security extensions.
&lt;br&gt;&lt;br&gt;Now the namespace qualified attribute of the above element:
&lt;br&gt;&lt;br&gt;element.setAttributeNS(WSConstants.WSU_NS, wsu:Id&amp;quot;, id);
&lt;br&gt;element.setAttributeNS(WSConstants.XMLNS_NS, &amp;quot;xmlns:wsu&amp;quot;, WSConstants.WSU_NS);
&lt;br&gt;&lt;br&gt;Hope this helped a bit :-) .
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;my:name xmlns:my=&amp;quot;a:b:c&amp;quot; xmlns:my=&amp;quot;a:b:b&amp;quot;/&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I'm pretty sure that's because of your bug, using a DOM1 call to create that
&lt;br&gt;&amp;gt;&amp;gt; initial attribute.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm not sure when this arrangement of the namespace and attribute occurs,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; but the ordering may be affected by the order of creation -
&lt;br&gt;&amp;gt;&amp;gt; createElementNS
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; first, followed by the attribute setup. In any case, I don't know what the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; canonicalizer would do with this. Neither do I know which xmlns:my would
&lt;br&gt;&amp;gt;&amp;gt; win
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; when the stream is read next time.
&lt;br&gt;&amp;gt;&amp;gt; Neither will because that XML isn't well-formed. It won't parse.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Try using setAttributeNS and I think you'll have more luck.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -- Scott
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19821418.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19819898</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-04T18:27:11Z</published>
	<updated>2008-10-04T18:27:11Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">Scott Cantor wrote:
&lt;br&gt;&amp;gt;&amp;gt; I am uncertain about the underlying assumptions here. Please correct me
&lt;br&gt;&amp;gt;&amp;gt; where I am wrong in what follows.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have to warn you, I'm not a c14n expert, and I know approximately zero
&lt;br&gt;&amp;gt; about XPath. What I'm knowledgable about are the practical aspects of using
&lt;br&gt;&amp;gt; a DOM and signing.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;And I know nothing about c14n, DOM or signing, and a little about XPath.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; When I construct a DOM with default configuration using createElementNS,
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; elements have an associated prefix, namespace and local name. I assume
&lt;br&gt;&amp;gt; such
&lt;br&gt;&amp;gt;&amp;gt; a DOM is a valid representation of an XML document, because when I
&lt;br&gt;&amp;gt; serialize
&lt;br&gt;&amp;gt;&amp;gt; such a DOM, I get a valid octet stream.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; No, you're incorrect there. First of all, &amp;quot;valid&amp;quot; isn't a term of art there
&lt;br&gt;&amp;gt; unless you apply a DTD or schema. The term is &amp;quot;well-formed&amp;quot;, and it is the
&lt;br&gt;&amp;gt; case that unless you add a namespace declaration attribute to the element
&lt;br&gt;&amp;gt; (or it's in scope above), the XML will not be well formed if you simply
&lt;br&gt;&amp;gt; output the DOM directly.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;Point taken. What I meant was just that the the DOM serializes with the
&lt;br&gt;correct namespaces.
&lt;br&gt;&lt;br&gt;&amp;gt; Now, if you run it through a fix-up in which the serializer &amp;quot;just fixes
&lt;br&gt;&amp;gt; stuff&amp;quot; like adding missing declarations, then yes, it might come out
&lt;br&gt;&amp;gt; well-formed.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;The serializer associated with JDK 1.6.0 does precisely this. I don't
&lt;br&gt;know whether such behaviour is mandated or discretionary, but it is
&lt;br&gt;entirely reasonable. Without is, what is the point of having a method
&lt;br&gt;createElementNS? It's presence, along with getPrefix, getNamespaceURI
&lt;br&gt;and getLocalName, simply muddies the waters.
&lt;br&gt;&lt;br&gt;And if the serializer can interpret the DOM in such a (to me,
&lt;br&gt;reasonable) way, why can't the canonicalizer?
&lt;br&gt;&lt;br&gt;I can't see that anyone would deliberately rely on the fact that, having
&lt;br&gt;created a namespaced element with createElementNS (including the prefix
&lt;br&gt;in the qualified name), that subsequent canonicalization would _not_
&lt;br&gt;include the namespace attribute. I can, however, see that there might be
&lt;br&gt;code out there that is de facto depending on this behaviour.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Also, I believe that formally speaking, a DOM itself has no well-formedness
&lt;br&gt;&amp;gt; property. I could be wrong about that. If it did, then I'm saying that in
&lt;br&gt;&amp;gt; your example, the DOM isn't.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;However, such a DOM does not, before
&lt;br&gt;&amp;gt;&amp;gt; I normalizeDocument, have attribute nodes containing namespace
&lt;br&gt;&amp;gt;&amp;gt; specifications. It has something, though, because it serializes correctly.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It serializes because any DOM can be serialized. &amp;quot;Correctness&amp;quot; depends on
&lt;br&gt;&amp;gt; context.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; It seems to me that this situation more closely represents the XPath data
&lt;br&gt;&amp;gt;&amp;gt; model than does the same DOM after normalization, in that namespace nodes
&lt;br&gt;&amp;gt;&amp;gt; cannot be found by searching the attribute axis. The can, however, be
&lt;br&gt;&amp;gt; found
&lt;br&gt;&amp;gt;&amp;gt; by means specific to namespaces: getprefix, getNamespaceURI, getLocalName.
&lt;br&gt;&amp;gt;&amp;gt; After normalizeDocument, these relationships still pertain.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; That's true, but the fact is that setting a prefix and namespace URI on an
&lt;br&gt;&amp;gt; element does NOT imply that the prefix is bound to that namespace. That
&lt;br&gt;&amp;gt; might be nice, but that's not how it works in a DOM.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; If, however, I attempt to set the namespace/attribute node specifically,
&lt;br&gt;&amp;gt;&amp;gt; using, say,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; root.setAttribute(&amp;quot;xmlns:my&amp;quot;, &amp;quot;a:b:d&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; things get messy.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Welcoome to XML. And FWIW, you'd use setAttributeNS. NEVER use DOM1 calls if
&lt;br&gt;&amp;gt; you're using namespaces.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;setAttributeNS doesn't work for me following createElementNS. I get
&lt;br&gt;org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or
&lt;br&gt;change an object in a way which is incorrect with regard to namespaces.
&lt;br&gt;&lt;br&gt;This makes sense, but means that the only way to get the xmlns attribute
&lt;br&gt;expressed is to normalizeDocument(). My feeling is that this reinforces
&lt;br&gt;my point about the expected behaviour of the serializer.
&lt;br&gt;&lt;br&gt;Does it work for you? Maybe I'm doing something wrong.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;my:name xmlns:my=&amp;quot;a:b:c&amp;quot; xmlns:my=&amp;quot;a:b:b&amp;quot;/&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm pretty sure that's because of your bug, using a DOM1 call to create that
&lt;br&gt;&amp;gt; initial attribute.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I'm not sure when this arrangement of the namespace and attribute occurs,
&lt;br&gt;&amp;gt;&amp;gt; but the ordering may be affected by the order of creation -
&lt;br&gt;&amp;gt; createElementNS
&lt;br&gt;&amp;gt;&amp;gt; first, followed by the attribute setup. In any case, I don't know what the
&lt;br&gt;&amp;gt;&amp;gt; canonicalizer would do with this. Neither do I know which xmlns:my would
&lt;br&gt;&amp;gt; win
&lt;br&gt;&amp;gt;&amp;gt; when the stream is read next time.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Neither will because that XML isn't well-formed. It won't parse.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Try using setAttributeNS and I think you'll have more luck.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Scott
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Peter B. West &amp;lt;&lt;a href=&quot;http://cv.pbw.id.au/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cv.pbw.id.au/&lt;/a&gt;&amp;gt;
&lt;br&gt;Folio &amp;lt;&lt;a href=&quot;http://defoe.sourceforge.net/folio/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://defoe.sourceforge.net/folio/&lt;/a&gt;&amp;gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19819898.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19809830</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-04T00:40:33Z</published>
	<updated>2008-10-04T00:40:33Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">Raul Benito schrieb:
&lt;br&gt;&amp;gt; I was talkinb about the use of them alone and then need to be c14n by
&lt;br&gt;&amp;gt; itself. Anyway I see the point, and I think is one of the sane ones to be
&lt;br&gt;&amp;gt; use outside of the signature. But please in order to not repeat it can you
&lt;br&gt;&amp;gt; send me the junit test case. It will be make the change faster, and it also
&lt;br&gt;&amp;gt; will allowed us not do the same mistake again.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Sure - I need to extract a &amp;quot;pure&amp;quot; xmlsec unit test out out the overall WSS4J
&lt;br&gt;unit test.
&lt;br&gt;&lt;br&gt;Just another thought in this context:
&lt;br&gt;The XML Signature specification (and the many other XML specifications in
&lt;br&gt;general) do not restrict usage of all the XML elements they define. Usually
&lt;br&gt;there is no definition of &amp;quot;this is an internal element&amp;quot; or &amp;quot;this is an external
&lt;br&gt;element&amp;quot; (xmlsec implements elements as objects).
&lt;br&gt;&lt;br&gt;For example KeyInfo is used in XML Signature as well as in XML Encryption
&lt;br&gt;specifications. Other elements specified in XML Signature may be re-used
&lt;br&gt;elsewhere (see to the large set of OASIS Web Service specifications :-) &amp;nbsp;).
&lt;br&gt;&lt;br&gt;In my understanding an implementation of XML Security specification (such as
&lt;br&gt;xmlsec) shall expect that _every_ element could be used in some other context,
&lt;br&gt;even stand-alone. There is no reason why an application shall not be able to
&lt;br&gt;re-use for example a &amp;quot;Reference&amp;quot; element, or a &amp;quot;X509Data&amp;quot; element as a
&lt;br&gt;stand-alone element if the application's XML structure requires this. And of
&lt;br&gt;course an application shall be able to use xmlsec in this case - because it
&lt;br&gt;exists, is tested, and implements these elements.
&lt;br&gt;&lt;br&gt;There is also no such definition as &amp;quot;a sane use outside as signature&amp;quot; - any
&lt;br&gt;application decides on its own what is &amp;quot;sane&amp;quot; or &amp;quot;insane&amp;quot; with respect to the
&lt;br&gt;XML structures it uses.
&lt;br&gt;&lt;br&gt;As a summary: there is *no reason* (and in large parts it's counter-productive)
&lt;br&gt;to single out elements that are defined in the specifications and make them
&lt;br&gt;usable in one specific context only.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Fri, Oct 3, 2008 at 5:15 PM, Werner Dittmann &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19809830&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Werner.Dittmann@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Raul Benito schrieb:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I think I made the change so I will try to defend it, first of all the use
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; of KeyInfo out of a Signature it is not a use case I was looking to.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Raul,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; KeyInfo as such (as an XML element) is not used inside Signature only. If
&lt;br&gt;&amp;gt;&amp;gt; you
&lt;br&gt;&amp;gt;&amp;gt; have a look into the OASIS WSS specification you will see that KeyInfo is
&lt;br&gt;&amp;gt;&amp;gt; used everywhere (nearly everywhere) a key is used, thus also to store
&lt;br&gt;&amp;gt;&amp;gt; information
&lt;br&gt;&amp;gt;&amp;gt; and references to encryption keys and so on. And these are exactly the test
&lt;br&gt;&amp;gt;&amp;gt; cases
&lt;br&gt;&amp;gt;&amp;gt; that break when we use KeyInfo to implement OASIS WSS.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt; Werner
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; perhaps we break it as we don't look at it. And sadly the old api is full
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; internal objects that can be use external. And I see KeyInfo like that.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; So in order to fix, can you write a test case that fails and submit a bug,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; will update the code in SVN head.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Raul
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19809830.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19801115</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-03T09:19:20Z</published>
	<updated>2008-10-03T09:19:20Z</updated>
	<author>
		<name>Raul Benito-2</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;I was talkinb about the use of them alone and then need to be c14n by itself. Anyway I see the point, and I think is one of the sane ones to be use outside of the signature. But please in order to not repeat it can you send me the junit test case. It will be make the change faster, and it also will allowed us not do the same mistake again.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Oct 3, 2008 at 5:15 PM, Werner Dittmann &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19801115&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Werner.Dittmann@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Raul Benito schrieb:&lt;div class=&quot;Ih2E3d&quot;&gt;&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Hello,&lt;br&gt;
I think I made the change so I will try to defend it, first of all the use&lt;br&gt;
of KeyInfo out of a Signature it is not a use case I was looking to. &lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
Raul,&lt;br&gt;
&lt;br&gt;
KeyInfo as such (as an XML element) is not used inside Signature only. If you&lt;br&gt;
have a look into the OASIS WSS specification you will see that KeyInfo is&lt;br&gt;
used everywhere (nearly everywhere) a key is used, thus also to store information&lt;br&gt;
and references to encryption keys and so on. And these are exactly the test cases&lt;br&gt;
that break when we use KeyInfo to implement OASIS WSS.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
Werner&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;Wj3C7c&quot;&gt;&lt;br&gt;
&lt;br&gt;
So&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
perhaps we break it as we don&amp;#39;t look at it. And sadly the old api is full of&lt;br&gt;
internal objects that can be use external. And I see KeyInfo like that.&lt;br&gt;
So in order to fix, can you write a test case that fails and submit a bug, I&lt;br&gt;
will update the code in SVN head.&lt;br&gt;
Thanks,&lt;br&gt;
Raul&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19801115.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19801053</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-03T09:15:00Z</published>
	<updated>2008-10-03T09:15:00Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">Raul Benito schrieb:
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; I think I made the change so I will try to defend it, first of all the use
&lt;br&gt;&amp;gt; of KeyInfo out of a Signature it is not a use case I was looking to. 
&lt;br&gt;&lt;br&gt;Raul,
&lt;br&gt;&lt;br&gt;KeyInfo as such (as an XML element) is not used inside Signature only. If you
&lt;br&gt;have a look into the OASIS WSS specification you will see that KeyInfo is
&lt;br&gt;used everywhere (nearly everywhere) a key is used, thus also to store information
&lt;br&gt;and references to encryption keys and so on. And these are exactly the test cases
&lt;br&gt;that break when we use KeyInfo to implement OASIS WSS.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;br&gt;So
&lt;br&gt;&amp;gt; perhaps we break it as we don't look at it. And sadly the old api is full of
&lt;br&gt;&amp;gt; internal objects that can be use external. And I see KeyInfo like that.
&lt;br&gt;&amp;gt; So in order to fix, can you write a test case that fails and submit a bug, I
&lt;br&gt;&amp;gt; will update the code in SVN head.
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Raul
&lt;br&gt;&amp;gt; 
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19801053.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19800658</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-03T08:55:24Z</published>
	<updated>2008-10-03T08:55:24Z</updated>
	<author>
		<name>Raul Benito-2</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;Hello,&lt;br&gt;I think I made the change so I will try to defend it, first of all the use of KeyInfo out of a Signature it is not a use case I was looking to. So perhaps we break it as we don&amp;#39;t look at it. And sadly the old api is full of internal objects that can be use external. And I see KeyInfo like that. &lt;br&gt;
So in order to fix, can you write a test case that fails and submit a bug, I will update the code in SVN head.&lt;br&gt;Thanks,&lt;br&gt;Raul&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Oct 3, 2008 at 4:31 PM, Werner Dittmann &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19800658&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Werner.Dittmann@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Scott Cantor schrieb:&lt;div class=&quot;Ih2E3d&quot;&gt;&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;br&gt;
Well, the bug is holistic. What I mean, and this is what I meant in my&lt;br&gt;
original comment, is that the bug is a consequence of the inconsistent XML&lt;br&gt;
handling across the range of libraries. It could be viewed as a bug in lots&lt;br&gt;
of places.&lt;br&gt;
&lt;br&gt;
In this specific case, I think it&amp;#39;s probably easy to argue that the xmlsec&lt;br&gt;
library has no reason not to declare that namespace, I suppose, but&lt;br&gt;
ultimately&lt;br&gt;
what xmlsec needs to do is define the contract...what is it prepared to&lt;br&gt;
promise about the DOM it gives you?&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
Well looking at the documentation of the KeyInfo class it says that it will&lt;br&gt;
look for &amp;quot;ds:KeyInfo&amp;quot; when constructed from an element. This is missing when&lt;br&gt;
&amp;quot;creating from scratch&amp;quot; but one can assume the KeyInfo is somewhat symmetric&lt;br&gt;
in its usage, thus also takes care of the ds: and namespace handling. IMHO,&lt;br&gt;
if an element creation class has do deal with specific and well defined namespaces&lt;br&gt;
that it should be the task of this class to take care of this. KeyInfo class&lt;br&gt;
creates an element with a namespace prefix, thus it should also add the necessary&lt;br&gt;
namespace attribute to it.&lt;br&gt;
&lt;br&gt;
In WSS4J we do it similarly: we return a full Doc tree where elements have&lt;br&gt;
their associated namespaces attributes thus the application does not need to&lt;br&gt;
know about the specific/efined namespaces.&lt;br&gt;
&lt;br&gt;
At least it seems that this modification in xmlsec-1.4.2 has some impacts on other&lt;br&gt;
applications as well because this modification broke an &amp;quot;assumed&amp;quot; contract.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
Werner&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;Wj3C7c&quot;&gt;&lt;br&gt;
&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
You have to work from that contract, or (as in the case of OpenSAML) build&lt;br&gt;
your own XML processing model that takes the responsibility on.&lt;br&gt;
&lt;br&gt;
But it&amp;#39;s also too easy to say &amp;quot;the caller has to fix up namespaces&amp;quot;, because&lt;br&gt;
unfortunately those namespaces are intrinsic to the signature process. You&lt;br&gt;
can&amp;#39;t just add them later and expect it to work.&lt;br&gt;
&lt;br&gt;
-- Scott&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19800658.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19800206</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-03T08:31:57Z</published>
	<updated>2008-10-03T08:31:57Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">Scott Cantor schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Well, the bug is holistic. What I mean, and this is what I meant in my
&lt;br&gt;&amp;gt; original comment, is that the bug is a consequence of the inconsistent XML
&lt;br&gt;&amp;gt; handling across the range of libraries. It could be viewed as a bug in lots
&lt;br&gt;&amp;gt; of places.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In this specific case, I think it's probably easy to argue that the xmlsec
&lt;br&gt;&amp;gt; library has no reason not to declare that namespace, I suppose, but
&lt;br&gt;&amp;gt; ultimately
&lt;br&gt;&amp;gt; what xmlsec needs to do is define the contract...what is it prepared to
&lt;br&gt;&amp;gt; promise about the DOM it gives you?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Well looking at the documentation of the KeyInfo class it says that it will
&lt;br&gt;look for &amp;quot;ds:KeyInfo&amp;quot; when constructed from an element. This is missing when
&lt;br&gt;&amp;quot;creating from scratch&amp;quot; but one can assume the KeyInfo is somewhat symmetric
&lt;br&gt;in its usage, thus also takes care of the ds: and namespace handling. IMHO,
&lt;br&gt;if an element creation class has do deal with specific and well defined namespaces
&lt;br&gt;that it should be the task of this class to take care of this. KeyInfo class
&lt;br&gt;creates an element with a namespace prefix, thus it should also add the necessary
&lt;br&gt;namespace attribute to it.
&lt;br&gt;&lt;br&gt;In WSS4J we do it similarly: we return a full Doc tree where elements have
&lt;br&gt;their associated namespaces attributes thus the application does not need to
&lt;br&gt;know about the specific/efined namespaces.
&lt;br&gt;&lt;br&gt;At least it seems that this modification in xmlsec-1.4.2 has some impacts on other
&lt;br&gt;applications as well because this modification broke an &amp;quot;assumed&amp;quot; contract.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; You have to work from that contract, or (as in the case of OpenSAML) build
&lt;br&gt;&amp;gt; your own XML processing model that takes the responsibility on.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But it's also too easy to say &amp;quot;the caller has to fix up namespaces&amp;quot;, because
&lt;br&gt;&amp;gt; unfortunately those namespaces are intrinsic to the signature process. You
&lt;br&gt;&amp;gt; can't just add them later and expect it to work.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Scott
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19800206.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19799738</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-10-03T08:08:23Z</published>
	<updated>2008-10-03T08:08:23Z</updated>
	<author>
		<name>Scott Cantor</name>
	</author>
	<content type="html">&amp;gt; thanks for your hints :-) . Of course - the xmlns:ds attribute is the
&lt;br&gt;&amp;gt; important part. After checking the attributes of KeyInfo it turned out
&lt;br&gt;&amp;gt; that no xmlns:ds attribute was found.
&lt;br&gt;&lt;br&gt;I figured.
&lt;br&gt;&lt;br&gt;&amp;gt; This functions differs between 1.4.1 and 1.4.2 in some important lines
&lt;br&gt;when
&lt;br&gt;&amp;gt; it comes to add the xmlns:ds attribute to the KeyInfo element (see code
&lt;br&gt;&amp;gt; snippets below). Why was this modification done? I couldn't
&lt;br&gt;finddocumentation
&lt;br&gt;&amp;gt; about this on the xmlsec Web pages. Does KeyInfo expect the user of
&lt;br&gt;KeyInfo
&lt;br&gt;&amp;gt; to set the xmlns:ds attribute? Or is it just a simple, plain old bug? :-)
&lt;br&gt;&lt;br&gt;Well, the bug is holistic. What I mean, and this is what I meant in my
&lt;br&gt;original comment, is that the bug is a consequence of the inconsistent XML
&lt;br&gt;handling across the range of libraries. It could be viewed as a bug in lots
&lt;br&gt;of places.
&lt;br&gt;&lt;br&gt;In this specific case, I think it's probably easy to argue that the xmlsec
&lt;br&gt;library has no reason not to declare that namespace, I suppose, but
&lt;br&gt;ultimately
&lt;br&gt;what xmlsec needs to do is define the contract...what is it prepared to
&lt;br&gt;promise about the DOM it gives you?
&lt;br&gt;&lt;br&gt;You have to work from that contract, or (as in the case of OpenSAML) build
&lt;br&gt;your own XML processing model that takes the responsibility on.
&lt;br&gt;&lt;br&gt;But it's also too easy to say &amp;quot;the caller has to fix up namespaces&amp;quot;, because
&lt;br&gt;unfortunately those namespaces are intrinsic to the signature process. You
&lt;br&gt;can't just add them later and expect it to work.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19799738.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19795190</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-03T03:22:04Z</published>
	<updated>2008-10-03T03:22:04Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">Scott,
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt;
&lt;br&gt;&amp;nbsp;&amp;gt; Sorry, that's not the point. Is there a namespace *declaration* there? The
&lt;br&gt;&amp;nbsp;&amp;gt; fact that the DOM knows that it has that namespace is irrelevant to the c14n
&lt;br&gt;&amp;nbsp;&amp;gt; process, as far as I'm aware. If the DOM doesn't have the xmlns:ds
&lt;br&gt;&amp;nbsp;&amp;gt; attribute, you will not get it back out.
&lt;br&gt;&amp;nbsp;&amp;gt;
&lt;br&gt;&lt;br&gt;thanks for your hints :-) . Of course - the xmlns:ds attribute is the
&lt;br&gt;important part. After checking the attributes of KeyInfo it turned out
&lt;br&gt;that no xmlns:ds attribute was found.
&lt;br&gt;&lt;br&gt;The source code that creates the document uses the
&lt;br&gt;org.apache.xml.security.keys.KeyInfo java class to create the keyinfo element
&lt;br&gt;and to link it into the security header. Digging a bit deeper (via
&lt;br&gt;&amp;quot;org.apache.xml.security.utils.SignatureElementProxy&amp;quot;) I found the function
&lt;br&gt;&amp;quot;createElementInSignatureSpace()&amp;quot; in &amp;quot;org.apache.xml.security.utils.XMLUtils&amp;quot;.
&lt;br&gt;&lt;br&gt;This functions differs between 1.4.1 and 1.4.2 in some important lines when
&lt;br&gt;it comes to add the xmlns:ds attribute to the KeyInfo element (see code
&lt;br&gt;snippets below). Why was this modification done? I couldn't find documentation
&lt;br&gt;about this on the xmlsec Web pages. Does KeyInfo expect the user of KeyInfo
&lt;br&gt;to set the xmlns:ds attribute? Or is it just a simple, plain old bug? :-)
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;br&gt;&lt;br&gt;Code snippets:
&lt;br&gt;&lt;br&gt;**** 1.4.1 :
&lt;br&gt;&amp;nbsp; &amp;nbsp; public static Element createElementInSignatureSpace(Document doc,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String elementName) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (doc == null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new RuntimeException(&amp;quot;Document is null&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((dsPrefix == null) || (dsPrefix.length() == 0)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Element element = doc.createElementNS(Constants.SignatureSpecNS,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elementName);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; element.setAttributeNS(Constants.NamespaceSpecNS, &amp;quot;xmlns&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Constants.SignatureSpecNS);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return element;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String namePrefix=(String) namePrefixes.get(elementName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (namePrefix==null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;StringBuffer tag=new StringBuffer(dsPrefix);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;tag.append(':');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;tag.append(elementName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;namePrefix=tag.toString();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;namePrefixes.put(elementName,namePrefix);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Element element = doc.createElementNS(Constants.SignatureSpecNS, namePrefix);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; element.setAttributeNS(Constants.NamespaceSpecNS, xmlnsDsPrefix,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Constants.SignatureSpecNS);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return element;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;**** 1.4.2 :
&lt;br&gt;&amp;nbsp; &amp;nbsp; public static Element createElementInSignatureSpace(Document doc,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String elementName) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (doc == null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new RuntimeException(&amp;quot;Document is null&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((dsPrefix == null) || (dsPrefix.length() == 0)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return doc.createElementNS(Constants.SignatureSpecNS, elementName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String namePrefix=(String) namePrefixes.get(elementName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (namePrefix==null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;StringBuffer tag=new StringBuffer(dsPrefix);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;tag.append(':');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;tag.append(elementName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;namePrefix=tag.toString();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;	 &amp;nbsp;namePrefixes.put(elementName,namePrefix);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return doc.createElementNS(Constants.SignatureSpecNS, namePrefix);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19795190.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19783101</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-10-02T09:44:05Z</published>
	<updated>2008-10-02T09:44:05Z</updated>
	<author>
		<name>Scott Cantor</name>
	</author>
	<content type="html">&amp;gt; the findElement(...) function finds a node, then the code prints its local
&lt;br&gt;&amp;gt; name and the namespace URI:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Before c14n
&lt;br&gt;&amp;gt; KeyInfo, &lt;a href=&quot;http://www.w3.org/2000/09/xmldsig#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2000/09/xmldsig#&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; After running c14n the xmlns: namespace binding is gone.
&lt;br&gt;&lt;br&gt;Sorry, that's not the point. Is there a namespace *declaration* there? The
&lt;br&gt;fact that the DOM knows that it has that namespace is irrelevant to the c14n
&lt;br&gt;process, as far as I'm aware. If the DOM doesn't have the xmlns:ds
&lt;br&gt;attribute, you will not get it back out.
&lt;br&gt;&lt;br&gt;&amp;gt; findElemen(...) is just a lookup function to find an element according to
&lt;br&gt;&amp;gt; the parameters and it does not modify the doc tree in any way.
&lt;br&gt;&lt;br&gt;Right, and it also doesn't pay any attention to namespace declarations.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19783101.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19782922</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-10-02T09:34:24Z</published>
	<updated>2008-10-02T09:34:24Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">After a small update of the test like this:
&lt;br&gt;&lt;br&gt;....
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Canonicalizer c14n =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&amp;quot;Before c14n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Node n = WSSecurityUtil.findElement(doc.getDocumentElement(), &amp;quot;KeyInfo&amp;quot;, &amp;quot;&lt;a href=&quot;http://www.w3.org/2000/09/xmldsig#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2000/09/xmldsig#&lt;/a&gt;&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (n == null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&amp;quot;KeyInfo not fond&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(n.getLocalName() + &amp;quot;, &amp;quot; + n.getNamespaceURI());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(XMLUtils.PrettyDocumentToString(doc));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;byte[] canonicalMessage = c14n.canonicalizeSubtree(doc);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&amp;quot;After c14n: &amp;quot; + new String(canonicalMessage));
&lt;br&gt;....
&lt;br&gt;&lt;br&gt;the findElement(...) function finds a node, then the code prints its local
&lt;br&gt;name and the namespace URI:
&lt;br&gt;&lt;br&gt;Before c14n
&lt;br&gt;KeyInfo, &lt;a href=&quot;http://www.w3.org/2000/09/xmldsig#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2000/09/xmldsig#&lt;/a&gt;&lt;br&gt;&lt;br&gt;After running c14n the xmlns: namespace binding is gone.
&lt;br&gt;findElemen(...) is just a lookup function to find an element according to
&lt;br&gt;the parameters and it does not modify the doc tree in any way.
&lt;br&gt;&lt;br&gt;Except for the new printout the output of this test of xmlsec-1.4.2 is the
&lt;br&gt;same as attached to my last e-mail
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;br&gt;&lt;br&gt;Scott Cantor schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; Is is still necessary to file a new bug for this, or has Werner's work
&lt;br&gt;&amp;gt;&amp;gt; covered this?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I think it's still being investigated. If there's no bug filed yet, I would
&lt;br&gt;&amp;gt; suggest doing so, and send Werner the bug number so he can attach the
&lt;br&gt;&amp;gt; results of his tests.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Scott
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19782922.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19781371</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-10-02T08:15:47Z</published>
	<updated>2008-10-02T08:15:47Z</updated>
	<author>
		<name>Scott Cantor</name>
	</author>
	<content type="html">&amp;gt; I am uncertain about the underlying assumptions here. Please correct me
&lt;br&gt;&amp;gt; where I am wrong in what follows.
&lt;br&gt;&lt;br&gt;I have to warn you, I'm not a c14n expert, and I know approximately zero
&lt;br&gt;about XPath. What I'm knowledgable about are the practical aspects of using
&lt;br&gt;a DOM and signing.
&lt;br&gt;&lt;br&gt;&amp;gt; When I construct a DOM with default configuration using createElementNS,
&lt;br&gt;the
&lt;br&gt;&amp;gt; elements have an associated prefix, namespace and local name. I assume
&lt;br&gt;such
&lt;br&gt;&amp;gt; a DOM is a valid representation of an XML document, because when I
&lt;br&gt;serialize
&lt;br&gt;&amp;gt; such a DOM, I get a valid octet stream.
&lt;br&gt;&lt;br&gt;No, you're incorrect there. First of all, &amp;quot;valid&amp;quot; isn't a term of art there
&lt;br&gt;unless you apply a DTD or schema. The term is &amp;quot;well-formed&amp;quot;, and it is the
&lt;br&gt;case that unless you add a namespace declaration attribute to the element
&lt;br&gt;(or it's in scope above), the XML will not be well formed if you simply
&lt;br&gt;output the DOM directly.
&lt;br&gt;&lt;br&gt;Now, if you run it through a fix-up in which the serializer &amp;quot;just fixes
&lt;br&gt;stuff&amp;quot; like adding missing declarations, then yes, it might come out
&lt;br&gt;well-formed.
&lt;br&gt;&lt;br&gt;Also, I believe that formally speaking, a DOM itself has no well-formedness
&lt;br&gt;property. I could be wrong about that. If it did, then I'm saying that in
&lt;br&gt;your example, the DOM isn't.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;However, such a DOM does not, before
&lt;br&gt;&amp;gt; I normalizeDocument, have attribute nodes containing namespace
&lt;br&gt;&amp;gt; specifications. It has something, though, because it serializes correctly.
&lt;br&gt;&lt;br&gt;It serializes because any DOM can be serialized. &amp;quot;Correctness&amp;quot; depends on
&lt;br&gt;context.
&lt;br&gt;&lt;br&gt;&amp;gt; It seems to me that this situation more closely represents the XPath data
&lt;br&gt;&amp;gt; model than does the same DOM after normalization, in that namespace nodes
&lt;br&gt;&amp;gt; cannot be found by searching the attribute axis. The can, however, be
&lt;br&gt;found
&lt;br&gt;&amp;gt; by means specific to namespaces: getprefix, getNamespaceURI, getLocalName.
&lt;br&gt;&amp;gt; After normalizeDocument, these relationships still pertain.
&lt;br&gt;&lt;br&gt;That's true, but the fact is that setting a prefix and namespace URI on an
&lt;br&gt;element does NOT imply that the prefix is bound to that namespace. That
&lt;br&gt;might be nice, but that's not how it works in a DOM.
&lt;br&gt;&lt;br&gt;&amp;gt; If, however, I attempt to set the namespace/attribute node specifically,
&lt;br&gt;&amp;gt; using, say,
&lt;br&gt;&amp;gt; &amp;nbsp; root.setAttribute(&amp;quot;xmlns:my&amp;quot;, &amp;quot;a:b:d&amp;quot;);
&lt;br&gt;&amp;gt; things get messy.
&lt;br&gt;&lt;br&gt;Welcoome to XML. And FWIW, you'd use setAttributeNS. NEVER use DOM1 calls if
&lt;br&gt;you're using namespaces.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;lt;my:name xmlns:my=&amp;quot;a:b:c&amp;quot; xmlns:my=&amp;quot;a:b:b&amp;quot;/&amp;gt;
&lt;br&gt;&lt;br&gt;I'm pretty sure that's because of your bug, using a DOM1 call to create that
&lt;br&gt;initial attribute.
&lt;br&gt;&lt;br&gt;&amp;gt; I'm not sure when this arrangement of the namespace and attribute occurs,
&lt;br&gt;&amp;gt; but the ordering may be affected by the order of creation -
&lt;br&gt;createElementNS
&lt;br&gt;&amp;gt; first, followed by the attribute setup. In any case, I don't know what the
&lt;br&gt;&amp;gt; canonicalizer would do with this. Neither do I know which xmlns:my would
&lt;br&gt;win
&lt;br&gt;&amp;gt; when the stream is read next time.
&lt;br&gt;&lt;br&gt;Neither will because that XML isn't well-formed. It won't parse.
&lt;br&gt;&lt;br&gt;Try using setAttributeNS and I think you'll have more luck.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19781371.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19773709</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-10-01T22:42:25Z</published>
	<updated>2008-10-01T22:42:25Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Scott Cantor wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;&amp;gt; Because we use it in WSS4J we always rely on the backward compatibility.
&lt;br&gt;&amp;gt; Changing the WSS4J code just to circumvent a problem would cause a major
&lt;br&gt;&amp;gt; effort to many applications that actually use WSS4J. Before changing
&lt;br&gt;&amp;gt; WSS4J we shall check if a fix in xmlsec is more appropriate.
&lt;br&gt;&lt;br&gt;If the issue is with how the XML is being serialized, that's your
&lt;br&gt;responsibility, not xmlsec's. Namespace declarations can't be assumed. You
&lt;br&gt;need to manage the DOM rigorously and with great attention to detail.
&lt;br&gt;&lt;br&gt;The fact that a lot of code in these Apache projects doesn't is exactly why
&lt;br&gt;we did our own.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Scott,
&lt;br&gt;&lt;br&gt;I am uncertain about the underlying assumptions here. Please correct me where I am wrong in what follows.
&lt;br&gt;&lt;br&gt;The problem I have seen involves canonicalization. The c14n processing model is defined in terms of the XPath data model. As I understand it, the XPath data model separates the attribute and namespace axes. You can't find the namespaces on the attribute axis.
&lt;br&gt;&lt;br&gt;Implementations of c14n may be based on XPath, or not. They may accept a node set as input, or not. When they do accept a node set, whether that node set is, in fact, a node set returned by XPath or a DOM nodeset, should it not be treated in a manner which is compatible with the XPath data model?
&lt;br&gt;&lt;br&gt;When I construct a DOM with default configuration using createElementNS, the elements have an associated prefix, namespace and local name. I assume such a DOM is a valid representation of an XML document, because when I serialize such a DOM, I get a valid octet stream. However, such a DOM does not, before I normalizeDocument, have attribute nodes containing namespace specifications. It has something, though, because it serializes correctly.
&lt;br&gt;&lt;br&gt;It seems to me that this situation more closely represents the XPath data model than does the same DOM after normalization, in that namespace nodes cannot be found by searching the attribute axis. The can, however, be found by means specific to namespaces: getprefix, getNamespaceURI, getLocalName. After normalizeDocument, these relationships still pertain.
&lt;br&gt;&lt;br&gt;If, however, I attempt to set the namespace/attribute node specifically, using, say,
&lt;br&gt;&amp;nbsp; root.setAttribute(&amp;quot;xmlns:my&amp;quot;, &amp;quot;a:b:d&amp;quot;);
&lt;br&gt;things get messy. For example,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Document doc = newDocument();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Element root = (Element) doc.createElementNS(&amp;quot;a:b:c&amp;quot;, &amp;quot;my:name&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root.setAttribute(&amp;quot;xmlns:my&amp;quot;, &amp;quot;a:b:b&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendChild(root);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;root ns: &amp;quot;+root.getNamespaceURI());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;prefix: &amp;quot;+root.getPrefix());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;localname: &amp;quot;+root.getLocalName());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NamedNodeMap map = root.getAttributes();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for ( int i = 0; i &amp;lt; map.getLength(); i++ ) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attr attr = (Attr) map.item(i);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;attr name: &amp;quot;+attr.getName());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;value: &amp;quot;+attr.getValue());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serializeTestData(doc, System.err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.normalizeDocument();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;root ns: &amp;quot;+root.getNamespaceURI());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;prefix: &amp;quot;+root.getPrefix());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;localname: &amp;quot;+root.getLocalName());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map = root.getAttributes();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for ( int i = 0; i &amp;lt; map.getLength(); i++ ) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attr attr = (Attr) map.item(i);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;attr name: &amp;quot;+attr.getName());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;value: &amp;quot;+attr.getValue());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serializeTestData(doc, System.err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&amp;quot;&amp;quot;);
&lt;br&gt;&lt;br&gt;gives me:
&lt;br&gt;&lt;br&gt;root ns: a:b:c
&lt;br&gt;prefix: my
&lt;br&gt;localname: name
&lt;br&gt;attr name: xmlns:my
&lt;br&gt;value: a:b:b
&lt;br&gt;&amp;lt;my:name xmlns:my=&amp;quot;a:b:c&amp;quot; xmlns:my=&amp;quot;a:b:b&amp;quot;/&amp;gt;
&lt;br&gt;root ns: a:b:c
&lt;br&gt;prefix: my
&lt;br&gt;localname: name
&lt;br&gt;attr name: xmlns:my
&lt;br&gt;value: a:b:c
&lt;br&gt;attr name: xmlns:my
&lt;br&gt;value: a:b:b
&lt;br&gt;&amp;lt;my:name xmlns:my=&amp;quot;a:b:c&amp;quot; xmlns:my=&amp;quot;a:b:b&amp;quot;/&amp;gt;
&lt;br&gt;&lt;br&gt;I'm not sure when this arrangement of the namespace and attribute occurs, but the ordering may be affected by the order of creation - createElementNS first, followed by the attribute setup. In any case, I don't know what the canonicalizer would do with this. Neither do I know which xmlns:my would win when the stream is read next time.
&lt;br&gt;&lt;br&gt;The situation is artificial, but the getPrefix, getNamespaceURI and getLocalName values are constant.
&lt;br&gt;&lt;br&gt;Peter</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19773709.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19772200</id>
	<title>Re: Can't trace org.jcp.xml.dsig.internal.dom.DOMXMLSignature in NetBeans</title>
	<published>2008-10-01T18:50:46Z</published>
	<updated>2008-10-01T18:50:46Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">Thanks Sean.
&lt;br&gt;&lt;br&gt;Yes, I tried that. I was interested to see if any problems that would surface for a user of the JDK, that were fixed in 1.4.2.
&lt;br&gt;&lt;br&gt;Peter
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;sean.mullan wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Peter B. West wrote:
&lt;br&gt;&amp;gt; That was quick. The source for org.jcp is not part of src.zip in the JDK
&lt;br&gt;&amp;gt; distribution. If I try to use the xmlsec-1.4.2.jar sources, things go wrong,
&lt;br&gt;&amp;gt; naturally. Where can I get the sources that were included in the JDK? I'm
&lt;br&gt;&amp;gt; used 1.6.0_07 and 1.6.0_10RC.
&lt;br&gt;&lt;br&gt;See: &lt;a href=&quot;http://download.java.net/jdk6/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://download.java.net/jdk6/&lt;/a&gt;&lt;br&gt;&lt;br&gt;It might be easier to use Apache XMLSec 1.4.2 jars with JDK 6, as then 
&lt;br&gt;you can debug the sources as they exist at Apache and use this alias for 
&lt;br&gt;reporting any issues.
&lt;br&gt;&lt;br&gt;You can do this with the endorsed override mechanism of the JDK. What 
&lt;br&gt;you need to do is download the following jars:
&lt;br&gt;&lt;br&gt;1) Java XMLSec 1.4.2
&lt;br&gt;&lt;a href=&quot;http://xml.apache.org/security/dist/java-library/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xml.apache.org/security/dist/java-library/&lt;/a&gt;&lt;br&gt;2) Commons Logging:
&lt;br&gt;&lt;a href=&quot;http://commons.apache.org/downloads/download_logging.cgi&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://commons.apache.org/downloads/download_logging.cgi&lt;/a&gt;&lt;br&gt;&lt;br&gt;You need the commons logging library because the Apache implementation 
&lt;br&gt;uses that instead of the JDK logging mechanism.
&lt;br&gt;&lt;br&gt;Put these two jars in a lib directory, and then specify that lib 
&lt;br&gt;directory as the endorsed directory when running your application, for 
&lt;br&gt;example:
&lt;br&gt;&lt;br&gt;java -Djava.endorsed.dirs=lib ...
&lt;br&gt;&lt;br&gt;--Sean
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Peter B. West wrote:
&lt;br&gt;&amp;gt;&amp;gt; I've been trying to track down problems by tracing in NetBeans. I am using
&lt;br&gt;&amp;gt;&amp;gt; the JSR-105 API for the signature components, so I assume that I am
&lt;br&gt;&amp;gt;&amp;gt; getting these classes from rt.jar, as there is no services SPI in the
&lt;br&gt;&amp;gt;&amp;gt; xmlsec-1.4.2.jar.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; When I try to trace the calls using NetBeans, the trace skips straight
&lt;br&gt;&amp;gt;&amp;gt; over the xmlsec classes, but happily traces into the other classes in the
&lt;br&gt;&amp;gt;&amp;gt; JDK. The Call Stack shows the DOMXMLSignature.sign method call in Hidden
&lt;br&gt;&amp;gt;&amp;gt; Source Calls, but knows the line number.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; See &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/file/p19752612/DOMSignContext.png&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/file/p19752612/DOMSignContext.png&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; DOMSignContext.png 
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Do you guys have any idea why this might be the case.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Peter
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Can%27t-trace-org.jcp.xml.dsig.internal.dom.DOMXMLSignature-in-NetBeans-tp19752612p19772200.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19766034</id>
	<title>Re: Can't trace org.jcp.xml.dsig.internal.dom.DOMXMLSignature in NetBeans</title>
	<published>2008-10-01T11:04:43Z</published>
	<updated>2008-10-01T11:04:43Z</updated>
	<author>
		<name>sean.mullan</name>
	</author>
	<content type="html">Peter B. West wrote:
&lt;br&gt;&amp;gt; That was quick. The source for org.jcp is not part of src.zip in the JDK
&lt;br&gt;&amp;gt; distribution. If I try to use the xmlsec-1.4.2.jar sources, things go wrong,
&lt;br&gt;&amp;gt; naturally. Where can I get the sources that were included in the JDK? I'm
&lt;br&gt;&amp;gt; used 1.6.0_07 and 1.6.0_10RC.
&lt;br&gt;&lt;br&gt;See: &lt;a href=&quot;http://download.java.net/jdk6/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://download.java.net/jdk6/&lt;/a&gt;&lt;br&gt;&lt;br&gt;It might be easier to use Apache XMLSec 1.4.2 jars with JDK 6, as then 
&lt;br&gt;you can debug the sources as they exist at Apache and use this alias for 
&lt;br&gt;reporting any issues.
&lt;br&gt;&lt;br&gt;You can do this with the endorsed override mechanism of the JDK. What 
&lt;br&gt;you need to do is download the following jars:
&lt;br&gt;&lt;br&gt;1) Java XMLSec 1.4.2
&lt;br&gt;&lt;a href=&quot;http://xml.apache.org/security/dist/java-library/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xml.apache.org/security/dist/java-library/&lt;/a&gt;&lt;br&gt;2) Commons Logging:
&lt;br&gt;&lt;a href=&quot;http://commons.apache.org/downloads/download_logging.cgi&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://commons.apache.org/downloads/download_logging.cgi&lt;/a&gt;&lt;br&gt;&lt;br&gt;You need the commons logging library because the Apache implementation 
&lt;br&gt;uses that instead of the JDK logging mechanism.
&lt;br&gt;&lt;br&gt;Put these two jars in a lib directory, and then specify that lib 
&lt;br&gt;directory as the endorsed directory when running your application, for 
&lt;br&gt;example:
&lt;br&gt;&lt;br&gt;java -Djava.endorsed.dirs=lib ...
&lt;br&gt;&lt;br&gt;--Sean
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Peter B. West wrote:
&lt;br&gt;&amp;gt;&amp;gt; I've been trying to track down problems by tracing in NetBeans. I am using
&lt;br&gt;&amp;gt;&amp;gt; the JSR-105 API for the signature components, so I assume that I am
&lt;br&gt;&amp;gt;&amp;gt; getting these classes from rt.jar, as there is no services SPI in the
&lt;br&gt;&amp;gt;&amp;gt; xmlsec-1.4.2.jar.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; When I try to trace the calls using NetBeans, the trace skips straight
&lt;br&gt;&amp;gt;&amp;gt; over the xmlsec classes, but happily traces into the other classes in the
&lt;br&gt;&amp;gt;&amp;gt; JDK. The Call Stack shows the DOMXMLSignature.sign method call in Hidden
&lt;br&gt;&amp;gt;&amp;gt; Source Calls, but knows the line number.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; See &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/file/p19752612/DOMSignContext.png&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/file/p19752612/DOMSignContext.png&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; DOMSignContext.png 
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Do you guys have any idea why this might be the case.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Peter
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Can%27t-trace-org.jcp.xml.dsig.internal.dom.DOMXMLSignature-in-NetBeans-tp19752612p19766034.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19753497</id>
	<title>Re: Questions about xml-security-1.4.2 and Java 1.6</title>
	<published>2008-09-30T19:15:29Z</published>
	<updated>2008-09-30T19:15:29Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">Sean, you mention that JDK6 include 1.3.1 + bug fixes. Where can I get hold of the source as included in 1.6?
&lt;br&gt;&lt;br&gt;Peter
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;sean.mullan wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;dan costelloe wrote:
&lt;br&gt;&amp;gt; Greetings,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I've recently been tinkering with xml-security-1.4.2 and the experience so far
&lt;br&gt;&amp;gt; has left me with some questions. Perhaps someone on this list may be able to
&lt;br&gt;&amp;gt; shed some light:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1) (Sun) Java 1.6 seems to already contain an xml-security implementation. Which
&lt;br&gt;&amp;gt; version of the implementation is this?
&lt;br&gt;&lt;br&gt;Yes, v 1.3.1 (plus a few important bug fixes).
&lt;br&gt;&lt;br&gt;&amp;gt; 2a) Is it possible to use the xml-security-1.4.2 classes in a java application
&lt;br&gt;&amp;gt; so that the 1.4.2 classes take a higher preference than those in rt.jar? If so,
&lt;br&gt;&amp;gt; can this be done without using the -Xbootclasspath argument to the JVM?
&lt;br&gt;&lt;br&gt;Yes, place xmlsec.jar in the endorsed standards directory [1]. You will 
&lt;br&gt;also need to put the Apache commons logging jar [2] there as well, since 
&lt;br&gt;the Apache code uses a different logging mechanism than the JDK.
&lt;br&gt;&lt;br&gt;&amp;gt; 2b) Can it be done without the removal of the xml-security classes from rt.jar?
&lt;br&gt;&lt;br&gt;Yes, see above.
&lt;br&gt;&lt;br&gt;--Sean
&lt;br&gt;&lt;br&gt;1: &lt;a href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/standards/index.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://java.sun.com/javase/6/docs/technotes/guides/standards/index.html&lt;/a&gt;&lt;br&gt;2: &lt;a href=&quot;http://commons.apache.org/logging/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://commons.apache.org/logging/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Questions-about-xml-security-1.4.2-and-Java-1.6-tp19051625p19753497.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19752814</id>
	<title>Re: Can't trace org.jcp.xml.dsig.internal.dom.DOMXMLSignature in NetBeans</title>
	<published>2008-09-30T17:40:03Z</published>
	<updated>2008-09-30T17:40:03Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">That was quick. The source for org.jcp is not part of src.zip in the JDK distribution. If I try to use the xmlsec-1.4.2.jar sources, things go wrong, naturally. Where can I get the sources that were included in the JDK? I'm used 1.6.0_07 and 1.6.0_10RC.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Peter B. West wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I've been trying to track down problems by tracing in NetBeans. I am using the JSR-105 API for the signature components, so I assume that I am getting these classes from rt.jar, as there is no services SPI in the xmlsec-1.4.2.jar.
&lt;br&gt;&lt;br&gt;When I try to trace the calls using NetBeans, the trace skips straight over the xmlsec classes, but happily traces into the other classes in the JDK. The Call Stack shows the DOMXMLSignature.sign method call in Hidden Source Calls, but knows the line number.
&lt;br&gt;&lt;br&gt;See &lt;a href=&quot;http://www.nabble.com/file/p19752612/DOMSignContext.png&quot; target=&quot;_top&quot;&gt;DOMSignContext.png&lt;/a&gt;&lt;br&gt;&lt;br&gt;Do you guys have any idea why this might be the case.
&lt;br&gt;&lt;br&gt;Peter
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Can%27t-trace-org.jcp.xml.dsig.internal.dom.DOMXMLSignature-in-NetBeans-tp19752612p19752814.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19752671</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-09-30T17:17:18Z</published>
	<updated>2008-09-30T17:17:18Z</updated>
	<author>
		<name>Scott Cantor</name>
	</author>
	<content type="html">&amp;gt; Is is still necessary to file a new bug for this, or has Werner's work
&lt;br&gt;&amp;gt; covered this?
&lt;br&gt;&lt;br&gt;I think it's still being investigated. If there's no bug filed yet, I would
&lt;br&gt;suggest doing so, and send Werner the bug number so he can attach the
&lt;br&gt;results of his tests.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19752671.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19752612</id>
	<title>Can't trace org.jcp.xml.dsig.internal.dom.DOMXMLSignature in NetBeans</title>
	<published>2008-09-30T17:10:11Z</published>
	<updated>2008-09-30T17:10:11Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">I've been trying to track down problems by tracing in NetBeans. I am using the JSR-105 API for the signature components, so I assume that I am getting these classes from rt.jar, as there is no services SPI in the xmlsec-1.4.2.jar.
&lt;br&gt;&lt;br&gt;When I try to trace the calls using NetBeans, the trace skips straight over the xmlsec classes, but happily traces into the other classes in the JDK. The Call Stack shows the DOMXMLSignature.sign method call in Hidden Source Calls, but knows the line number.
&lt;br&gt;&lt;br&gt;See &lt;a href=&quot;http://www.nabble.com/file/p19752612/DOMSignContext.png&quot; target=&quot;_top&quot;&gt;DOMSignContext.png&lt;/a&gt;&lt;br&gt;&lt;br&gt;Do you guys have any idea why this might be the case.
&lt;br&gt;&lt;br&gt;Peter</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Can%27t-trace-org.jcp.xml.dsig.internal.dom.DOMXMLSignature-in-NetBeans-tp19752612p19752612.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19752450</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-09-30T16:53:08Z</published>
	<updated>2008-09-30T16:53:08Z</updated>
	<author>
		<name>Peter B. West</name>
	</author>
	<content type="html">Sean,
&lt;br&gt;&lt;br&gt;Is is still necessary to file a new bug for this, or has Werner's work covered this?
&lt;br&gt;&lt;br&gt;Peter
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;sean.mullan wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I don't know what the cause of this regression could be.
&lt;br&gt;&lt;br&gt;The best thing to do is for Arnaud or Peter to file a new bug at 
&lt;br&gt;&lt;a href=&quot;http://issues.apache.org/bugzilla&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://issues.apache.org/bugzilla&lt;/a&gt;&amp;nbsp;under the Security project and if possible, 
&lt;br&gt;attach a standalone (i.e. not dependent on WSS4J) test case that reproduces the 
&lt;br&gt;problem.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Sean
&lt;br&gt;&lt;br&gt;Werner Dittmann wrote:
&lt;br&gt;&amp;gt; All,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; why did it work with 1.4.0 and 1.4.1 then? Were these two version
&lt;br&gt;&amp;gt; buggy in that case? Or what was changed in 1.4.2 to get this
&lt;br&gt;&amp;gt; incompatible behaviour?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Because we use it in WSS4J we always rely on the backward compatibility.
&lt;br&gt;&amp;gt; Changing the WSS4J code just to circumvent a problem would cause a major
&lt;br&gt;&amp;gt; effort to many applications that actually use WSS4J. Before changing
&lt;br&gt;&amp;gt; WSS4J we shall check if a fix in xmlsec is more appropriate.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Werner
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Arnaud schrieb:
&lt;br&gt;&amp;gt;&amp;gt; Peter B. West &amp;lt;lists &amp;lt;at&amp;gt; pbw.id.au&amp;gt; writes:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Arnaud,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm using 1.4.2, and the problem I had may not be the same as yours, but
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; see my messages &amp;quot;Unbound prefix after decryption&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; In my case, the problem was that the DOM being passed for encryption id
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; not have the xmlns attribute set before it was processed. A
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; normalizeDocument() in the right place fixed the problem.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Peter
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Arnaud wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Since using Chinese in soap messages which had their header encrypt 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; was not working (and after visiting the XML security page) I 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; upgraded the libraries 
&lt;br&gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1.4.1 as recommended.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; And now I have the following exception on the serverside:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix &amp;quot;ds&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;at [row,col {unknown-source}]: [6,12]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The &amp;quot;[row,col {unknown-source}]: [6,12]&amp;quot; refers to the &amp;lt;ds:KeyInfo&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; of the 
&lt;br&gt;&amp;gt;&amp;gt; soap
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; header. If I compare the message sent by the client before the upgrade:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;ds:KeyInfo xmlns:ds=&amp;quot;&lt;a href=&quot;http://www.w3.org/2000/09/xmldsig#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2000/09/xmldsig#&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;/ds:KeyInfo&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and after:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;ds:KeyInfo&amp;gt; ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;/ds:KeyInfo&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I can see the namespace disappeared but I have no idea why and how 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to fix that...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If anyone has an idea please let me know because I don't know what 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to do 
&lt;br&gt;&amp;gt;&amp;gt; about
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it and I've alread spend many hours on this...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks in advance for any help.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Arnaud.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi Peter,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks a lot for your quick reply!
&lt;br&gt;&amp;gt;&amp;gt; In my case, I'm not using the xml security libs directly but WSS4J 
&lt;br&gt;&amp;gt;&amp;gt; does that for me. Anyway, after reading your post I decided to 
&lt;br&gt;&amp;gt;&amp;gt; download the WSS4J source... And I added the normalizeDocument() just 
&lt;br&gt;&amp;gt;&amp;gt; after WSS4J calls the xml security to handle encryption and 
&lt;br&gt;&amp;gt;&amp;gt; signature... And you are right this fix the problem!!! &amp;nbsp; I will 
&lt;br&gt;&amp;gt;&amp;gt; probably send a mail to the WSS4J team to let them know about this.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Again thanks a lot!!!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Arnaud.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19752450.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19745695</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-09-30T09:29:20Z</published>
	<updated>2008-09-30T09:29:20Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">Scott Cantor schrieb:
&lt;br&gt;&amp;gt;&amp;gt; Thus the printout &amp;quot;before c14n&amp;quot; is the doc tree just before c14n. IMHO the
&lt;br&gt;&amp;gt;&amp;gt; Transformer does not add/modify during transformation of the doc tree to a
&lt;br&gt;&amp;gt;&amp;gt; string.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Unless we can prove that, my bet might be that the DOM before that step
&lt;br&gt;&amp;gt; doesn't contain the declaration, and the DOM after it does. Thus the
&lt;br&gt;&amp;gt; transformer might be adding it to &amp;quot;fix-up&amp;quot; the DOM.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;I don't know what the transfomer does (never looked at the code). Of course I'll
&lt;br&gt;insert some code to check if the xmlns:ds is contained in KeyInfo - I'll keep
&lt;br&gt;you informed :-)
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;br&gt;&amp;gt; Can you inject some DOM code to just check the KeyInfo element and see if it
&lt;br&gt;&amp;gt; has xmlns:ds declared? If it does, I think there has to be bug in the c14n
&lt;br&gt;&amp;gt; code, although it sure seems like a blatant one...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Scott
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19745695.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19730357</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-09-29T12:39:37Z</published>
	<updated>2008-09-29T12:39:37Z</updated>
	<author>
		<name>Scott Cantor</name>
	</author>
	<content type="html">&amp;gt; Thus the printout &amp;quot;before c14n&amp;quot; is the doc tree just before c14n. IMHO the
&lt;br&gt;&amp;gt; Transformer does not add/modify during transformation of the doc tree to a
&lt;br&gt;&amp;gt; string.
&lt;br&gt;&lt;br&gt;Unless we can prove that, my bet might be that the DOM before that step
&lt;br&gt;doesn't contain the declaration, and the DOM after it does. Thus the
&lt;br&gt;transformer might be adding it to &amp;quot;fix-up&amp;quot; the DOM.
&lt;br&gt;&lt;br&gt;Can you inject some DOM code to just check the KeyInfo element and see if it
&lt;br&gt;has xmlns:ds declared? If it does, I think there has to be bug in the c14n
&lt;br&gt;code, although it sure seems like a blatant one...
&lt;br&gt;&lt;br&gt;-- Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19730357.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19727448</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-09-29T09:44:48Z</published>
	<updated>2008-09-29T09:44:48Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">All,
&lt;br&gt;&lt;br&gt;I've checked the input and output of c14n of xmlsec-1.4.2 and it seems
&lt;br&gt;the c14n does not emit the ds: name space binding of the KeyInfo node.
&lt;br&gt;Attached is the text file of the test run.
&lt;br&gt;&lt;br&gt;The same test but using xmlsec-1.4.1 shows the name space binding before
&lt;br&gt;and after c14n.
&lt;br&gt;&lt;br&gt;The following the code snippet was used to produce the test output file:
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Canonicalizer c14n =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&amp;quot;Before c14n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(XMLUtils.PrettyDocumentToString(doc));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;byte[] canonicalMessage = c14n.canonicalizeSubtree(doc);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&amp;quot;After c14n: &amp;quot; + new String(canonicalMessage));
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;the XMLUtils.PrettyDocumentToString(doc) (XMLUtils is not the xmlsec XMLUtils
&lt;br&gt;but an own one :-) ) performs as follows:
&lt;br&gt;&lt;br&gt;public class XMLUtils {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;public static String PrettyDocumentToString(Document doc) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ByteArrayOutputStream baos = new ByteArrayOutputStream();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ElementToStream(doc.getDocumentElement(), baos);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new String(baos.toByteArray());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;public static void ElementToStream(Element element, OutputStream out) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DOMSource source = new DOMSource(element);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StreamResult result = new StreamResult(out);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TransformerFactory transFactory = TransformerFactory.newInstance();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Transformer transformer = transFactory.newTransformer();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;transformer.transform(source, result);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e.printStackTrace();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;....
&lt;br&gt;&lt;br&gt;Thus the printout &amp;quot;before c14n&amp;quot; is the doc tree just before c14n. IMHO the Transformer
&lt;br&gt;does not add/modify during transformation of the doc tree to a string.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;br&gt;Scott Cantor schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; Questions here: does the XML doc that goes into C14N misses any
&lt;br&gt;&amp;gt;&amp;gt; xmlns: declarations at some important positions? If so - where should
&lt;br&gt;&amp;gt;&amp;gt; we include these?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; With either incl or excl, the ds namespace prefix should be emitted in both
&lt;br&gt;&amp;gt; spots, since it's visibly used in that element, and not used anywhere up
&lt;br&gt;&amp;gt; above it. So the first/only place it should appear is in the KeyInfo
&lt;br&gt;&amp;gt; element.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you're saying that the XML listed first is directly passed (in DOM form)
&lt;br&gt;&amp;gt; into the c14n step, and the output is missing the ds namespace, then it's a
&lt;br&gt;&amp;gt; c14n bug.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Otherwise the bug is in the process being used to turn the original XML into
&lt;br&gt;&amp;gt; a DOM that you give to the c14n code.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Scott
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Before c14n
&lt;br&gt;&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;soapenv:Envelope xmlns:soapenv=&amp;quot;&lt;a href=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/a&gt;&amp;quot; xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot; xmlns:xsd=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot; xmlns:xsi=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;soapenv:Header&amp;gt;
&lt;br&gt;&amp;lt;wsse:Security xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot; soapenv:mustUnderstand=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;wsse:BinarySecurityToken xmlns:wsu=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&lt;/a&gt;&amp;quot; EncodingType=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&lt;/a&gt;&amp;quot; ValueType=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&lt;/a&gt;&amp;quot; wsu:Id=&amp;quot;urn:uuid:53A8D861C43C9251E812227056952511&amp;quot; xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;&amp;gt;MIIDNDCCAp2gAwIBAgIBEDANBgkqhkiG9w0BAQQFADBmMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmF5ZXJuMQ8wDQYDVQQHEwZNdW5pY2gxDTALBgNVBAoTBEhvbWUxFTATBgNVBAsTDEFwYWNoZSBXU1M0SjEPMA0GA1UEAxMGV2VybmVyMB4XDTA4MDQwNDE5MzIxOFoXDTEwMDQwNDE5MzIxOFowYTELMAkGA1UEBhMCREUxDzANBgNVBAgTBkJheWVybjEPMA0GA1UEBxMGTXVuaWNoMQ8wDQYDVQQKEwZBcGFjaGUxDjAMBgNVBAsTBVdTUzRKMQ8wDQYDVQQDEwZXZXJuZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAINlL3/k0H/zvknpBtLo8jzXwx/IJU/CGSv6MsqJZ2fyZ6kpLlXCuSBUZ/tfkdxpuzhYq/Sc7A8csIk9gDf9RUbrhK0qKw0VP6DoCIJjS5IeN+NeJkx8YjmzLPmZqLYbNPXr/hy8CRrR6CqLTTSkBwoEJ+cDkfZrdH2/bND0FEIZAgMBAAGjgfYwgfMwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFFSZXv0I5bG7XPEwjylwG3lmZGdiMIGYBgNVHSMEgZAwgY2AFL/FsHHolGIMacU1TZW/88Bd2EL6oWqkaDBmMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmF5ZXJuMQ8wDQYDVQQHEwZNdW5pY2gxDTALBgNVBAoTBEhvbWUxFTATBgNVBAsTDEFwYWNoZSBXU1M0SjEPMA0GA1UEAxMGV2VybmVyggkAuBIOAWJ19mwwDQYJKoZIhvcNAQEEBQADgYEAUiUh/wORVcQYXxIh13h3w2Btg6Kj2g6V6YO0Utc/gEYWwT310C2OuroKAwwoHapMIIWiJRclIAiA8Hnb0Sv/puuHYD4G4NWFdiVjRord90eZJe40NMGruRmlqIRIGGKCv+wv3E6Ux1cWW862f5H9Eyrcocke2P+3GNAGy83vghA=&amp;lt;/wsse:BinarySecurityToken&amp;gt;&amp;lt;xenc:EncryptedKey Id=&amp;quot;EncKeyId-urn:uuid:53A8D861C43C9251E812227056952682&amp;quot; xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;xenc:EncryptionMethod Algorithm=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#rsa-1_5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#rsa-1_5&lt;/a&gt;&amp;quot;/&amp;gt;
&lt;br&gt;&amp;lt;ds:KeyInfo xmlns:ds=&amp;quot;&lt;a href=&quot;http://www.w3.org/2000/09/xmldsig#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2000/09/xmldsig#&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;wsse:SecurityTokenReference xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;wsse:Reference URI=&amp;quot;#urn:uuid:53A8D861C43C9251E812227056952511&amp;quot; ValueType=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&lt;/a&gt;&amp;quot; xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;/&amp;gt;&amp;lt;/wsse:SecurityTokenReference&amp;gt;
&lt;br&gt;&amp;lt;/ds:KeyInfo&amp;gt;
&lt;br&gt;&amp;lt;xenc:CipherData&amp;gt;&amp;lt;xenc:CipherValue&amp;gt;QNzRQyTf8By78r5vjLJRMgwdAWqcVArd7ycxrVADdWItCf+buh12Es05rAwO1GETg4LgPrENdkvsQ5uhwITQYveBW7f6ikDHENruKNhYzYQGofihxzQ+o6xIgQrla2SyqBZ26fdImMdZiCzyFb4YEk7w0GmASi2af+HlROgXRlA=&amp;lt;/xenc:CipherValue&amp;gt;&amp;lt;/xenc:CipherData&amp;gt;
&lt;br&gt;&amp;lt;xenc:ReferenceList&amp;gt;&amp;lt;xenc:DataReference URI=&amp;quot;#EncDataId-1246293429&amp;quot;/&amp;gt;&amp;lt;/xenc:ReferenceList&amp;gt;&amp;lt;/xenc:EncryptedKey&amp;gt;&amp;lt;/wsse:Security&amp;gt;&amp;lt;/soapenv:Header&amp;gt;&amp;lt;soapenv:Body&amp;gt;&amp;lt;xenc:EncryptedData Id=&amp;quot;EncDataId-1246293429&amp;quot; Type=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#Content&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#Content&lt;/a&gt;&amp;quot; xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;xenc:EncryptionMethod Algorithm=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#tripledes-cbc&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#tripledes-cbc&lt;/a&gt;&amp;quot; xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot;/&amp;gt;&amp;lt;ds:KeyInfo xmlns:ds=&amp;quot;&lt;a href=&quot;http://www.w3.org/2000/09/xmldsig#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2000/09/xmldsig#&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;wsse:SecurityTokenReference xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;wsse:Reference URI=&amp;quot;#EncKeyId-urn:uuid:53A8D861C43C9251E812227056952682&amp;quot; xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;/&amp;gt;&amp;lt;/wsse:SecurityTokenReference&amp;gt;
&lt;br&gt;&amp;lt;/ds:KeyInfo&amp;gt;&amp;lt;xenc:CipherData xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;xenc:CipherValue xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot;&amp;gt;JSjGbM2Jb7+oPGNEwdf9PhqrOIWJnGwyB/HHoZiy3cjvZM2D7U0G5Kgb9Bwz+LRjMFQghSnpHNnS
&lt;br&gt;uwH9EeU8XnJLuI2BUQSb3X3x/FuaHWcjZncOtwg9HllTpD26MTEzuHJFpSnC/gEHcLueXzg324bN
&lt;br&gt;zEwj9XqBvdBgmbRblDfNREcY+9XBrp5OxCWfkaGWoNUDefLBoTRsaTi5heclSxcudFx6lk/riHzZ
&lt;br&gt;SRGQamR1kNbVj9BwJjKmNuEQHpq4ZOgkjB4cPFIHNBW9vwX+yQOgMpp3k5A79GkDDa9qCdaqvrka
&lt;br&gt;nqFkZUrl4rhslRUDFKCnhve0vmDTtDta3o3uuOMxVolWpjn3dt04q5IcaXoHsKesNVDHsA==&amp;lt;/xenc:CipherValue&amp;gt;&amp;lt;/xenc:CipherData&amp;gt;&amp;lt;/xenc:EncryptedData&amp;gt;&amp;lt;/soapenv:Body&amp;gt;&amp;lt;/soapenv:Envelope&amp;gt;
&lt;br&gt;&lt;br&gt;After c14n: 
&lt;br&gt;&lt;br&gt;&amp;lt;soapenv:Envelope xmlns:soapenv=&amp;quot;&lt;a href=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/a&gt;&amp;quot; xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot; xmlns:xsd=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot; xmlns:xsi=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;soapenv:Header&amp;gt;
&lt;br&gt;&amp;lt;wsse:Security xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot; soapenv:mustUnderstand=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;wsse:BinarySecurityToken xmlns:wsu=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&lt;/a&gt;&amp;quot; EncodingType=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&lt;/a&gt;&amp;quot; ValueType=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&lt;/a&gt;&amp;quot; wsu:Id=&amp;quot;urn:uuid:53A8D861C43C9251E812227056952511&amp;quot;&amp;gt;MIIDNDCCAp2gAwIBAgIBEDANBgkqhkiG9w0BAQQFADBmMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmF5ZXJuMQ8wDQYDVQQHEwZNdW5pY2gxDTALBgNVBAoTBEhvbWUxFTATBgNVBAsTDEFwYWNoZSBXU1M0SjEPMA0GA1UEAxMGV2VybmVyMB4XDTA4MDQwNDE5MzIxOFoXDTEwMDQwNDE5MzIxOFowYTELMAkGA1UEBhMCREUxDzANBgNVBAgTBkJheWVybjEPMA0GA1UEBxMGTXVuaWNoMQ8wDQYDVQQKEwZBcGFjaGUxDjAMBgNVBAsTBVdTUzRKMQ8wDQYDVQQDEwZXZXJuZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAINlL3/k0H/zvknpBtLo8jzXwx/IJU/CGSv6MsqJZ2fyZ6kpLlXCuSBUZ/tfkdxpuzhYq/Sc7A8csIk9gDf9RUbrhK0qKw0VP6DoCIJjS5IeN+NeJkx8YjmzLPmZqLYbNPXr/hy8CRrR6CqLTTSkBwoEJ+cDkfZrdH2/bND0FEIZAgMBAAGjgfYwgfMwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFFSZXv0I5bG7XPEwjylwG3lmZGdiMIGYBgNVHSMEgZAwgY2AFL/FsHHolGIMacU1TZW/88Bd2EL6oWqkaDBmMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmF5ZXJuMQ8wDQYDVQQHEwZNdW5pY2gxDTALBgNVBAoTBEhvbWUxFTATBgNVBAsTDEFwYWNoZSBXU1M0SjEPMA0GA1UEAxMGV2VybmVyggkAuBIOAWJ19mwwDQYJKoZIhvcNAQEEBQADgYEAUiUh/wORVcQYXxIh13h3w2Btg6Kj2g6V6YO0Utc/gEYWwT310C2OuroKAwwoHapMIIWiJRclIAiA8Hnb0Sv/puuHYD4G4NWFdiVjRord90eZJe40NMGruRmlqIRIGGKCv+wv3E6Ux1cWW862f5H9Eyrcocke2P+3GNAGy83vghA=&amp;lt;/wsse:BinarySecurityToken&amp;gt;&amp;lt;xenc:EncryptedKey Id=&amp;quot;EncKeyId-urn:uuid:53A8D861C43C9251E812227056952682&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;xenc:EncryptionMethod Algorithm=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#rsa-1_5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#rsa-1_5&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;/xenc:EncryptionMethod&amp;gt;
&lt;br&gt;&amp;lt;ds:KeyInfo&amp;gt;
&lt;br&gt;&amp;lt;wsse:SecurityTokenReference&amp;gt;&amp;lt;wsse:Reference URI=&amp;quot;#urn:uuid:53A8D861C43C9251E812227056952511&amp;quot; ValueType=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;/wsse:Reference&amp;gt;&amp;lt;/wsse:SecurityTokenReference&amp;gt;
&lt;br&gt;&amp;lt;/ds:KeyInfo&amp;gt;
&lt;br&gt;&amp;lt;xenc:CipherData&amp;gt;&amp;lt;xenc:CipherValue&amp;gt;QNzRQyTf8By78r5vjLJRMgwdAWqcVArd7ycxrVADdWItCf+buh12Es05rAwO1GETg4LgPrENdkvsQ5uhwITQYveBW7f6ikDHENruKNhYzYQGofihxzQ+o6xIgQrla2SyqBZ26fdImMdZiCzyFb4YEk7w0GmASi2af+HlROgXRlA=&amp;lt;/xenc:CipherValue&amp;gt;&amp;lt;/xenc:CipherData&amp;gt;
&lt;br&gt;&amp;lt;xenc:ReferenceList&amp;gt;&amp;lt;xenc:DataReference URI=&amp;quot;#EncDataId-1246293429&amp;quot;&amp;gt;&amp;lt;/xenc:DataReference&amp;gt;&amp;lt;/xenc:ReferenceList&amp;gt;&amp;lt;/xenc:EncryptedKey&amp;gt;&amp;lt;/wsse:Security&amp;gt;&amp;lt;/soapenv:Header&amp;gt;&amp;lt;soapenv:Body&amp;gt;&amp;lt;xenc:EncryptedData Id=&amp;quot;EncDataId-1246293429&amp;quot; Type=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#Content&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#Content&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;xenc:EncryptionMethod Algorithm=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#tripledes-cbc&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#tripledes-cbc&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;/xenc:EncryptionMethod&amp;gt;&amp;lt;ds:KeyInfo&amp;gt;
&lt;br&gt;&amp;lt;wsse:SecurityTokenReference xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;&amp;gt;&amp;lt;wsse:Reference URI=&amp;quot;#EncKeyId-urn:uuid:53A8D861C43C9251E812227056952682&amp;quot;&amp;gt;&amp;lt;/wsse:Reference&amp;gt;&amp;lt;/wsse:SecurityTokenReference&amp;gt;
&lt;br&gt;&amp;lt;/ds:KeyInfo&amp;gt;&amp;lt;xenc:CipherData&amp;gt;&amp;lt;xenc:CipherValue&amp;gt;JSjGbM2Jb7+oPGNEwdf9PhqrOIWJnGwyB/HHoZiy3cjvZM2D7U0G5Kgb9Bwz+LRjMFQghSnpHNnS
&lt;br&gt;uwH9EeU8XnJLuI2BUQSb3X3x/FuaHWcjZncOtwg9HllTpD26MTEzuHJFpSnC/gEHcLueXzg324bN
&lt;br&gt;zEwj9XqBvdBgmbRblDfNREcY+9XBrp5OxCWfkaGWoNUDefLBoTRsaTi5heclSxcudFx6lk/riHzZ
&lt;br&gt;SRGQamR1kNbVj9BwJjKmNuEQHpq4ZOgkjB4cPFIHNBW9vwX+yQOgMpp3k5A79GkDDa9qCdaqvrka
&lt;br&gt;nqFkZUrl4rhslRUDFKCnhve0vmDTtDta3o3uuOMxVolWpjn3dt04q5IcaXoHsKesNVDHsA==&amp;lt;/xenc:CipherValue&amp;gt;&amp;lt;/xenc:CipherData&amp;gt;&amp;lt;/xenc:EncryptedData&amp;gt;&amp;lt;/soapenv:Body&amp;gt;&amp;lt;/soapenv:Envelope&amp;gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19727448.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19714030</id>
	<title>RE: Undeclared namespace prefix</title>
	<published>2008-09-28T11:24:49Z</published>
	<updated>2008-09-28T11:24:49Z</updated>
	<author>
		<name>Scott Cantor</name>
	</author>
	<content type="html">&amp;gt; Questions here: does the XML doc that goes into C14N misses any
&lt;br&gt;&amp;gt; xmlns: declarations at some important positions? If so - where should
&lt;br&gt;&amp;gt; we include these?
&lt;br&gt;&lt;br&gt;With either incl or excl, the ds namespace prefix should be emitted in both
&lt;br&gt;spots, since it's visibly used in that element, and not used anywhere up
&lt;br&gt;above it. So the first/only place it should appear is in the KeyInfo
&lt;br&gt;element.
&lt;br&gt;&lt;br&gt;If you're saying that the XML listed first is directly passed (in DOM form)
&lt;br&gt;into the c14n step, and the output is missing the ds namespace, then it's a
&lt;br&gt;c14n bug.
&lt;br&gt;&lt;br&gt;Otherwise the bug is in the process being used to turn the original XML into
&lt;br&gt;a DOM that you give to the c14n code.
&lt;br&gt;&lt;br&gt;-- Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Undeclared-namespace-prefix-%22ds%22-error-tp19668706p19714030.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19700327</id>
	<title>Re: Undeclared namespace prefix</title>
	<published>2008-09-27T00:15:27Z</published>
	<updated>2008-09-27T00:15:27Z</updated>
	<author>
		<name>Werner Dittmann</name>
	</author>
	<content type="html">After doing some more tests I came to the following results (no
&lt;br&gt;solution yet). The processing for the test case is as follows:
&lt;br&gt;&lt;br&gt;Create a XML DOM with encrypted data, relevant elements etc using
&lt;br&gt;xmlsec library. This works without any error messages
&lt;br&gt;&lt;br&gt;In the test case a printout of the produced XML document is done,
&lt;br&gt;the a canonicalization of the message that serializes it into
&lt;br&gt;readable XML output. That serialized message is then pares again.
&lt;br&gt;&lt;br&gt;The same test case and flow is used when testing xmlsec 1.4.1 and
&lt;br&gt;1.4.2. The difference between these two runs is after the C14N
&lt;br&gt;step: using xmlsec 1.4.1 and its C14N methods the name space declaration
&lt;br&gt;for ds:KeyInfo is available, using xmlsec 1.4.2 C14N removes these
&lt;br&gt;name space declarations
&lt;br&gt;&lt;br&gt;The attached files show this differences. Both files contain the
&lt;br&gt;pretty print of the XML doc after xmlsec encryption processing but
&lt;br&gt;before C14N, after that the raw output after C14N is shown. As you
&lt;br&gt;can see in both cases the input to C14N is the same (except for the encrypted
&lt;br&gt;data because the key is a random key), and in both cases the ds:KeyInfo
&lt;br&gt;nodes contain the xmlns: declaration.
&lt;br&gt;&lt;br&gt;Only after xmlsec 1.4.2 C14N the ds:KeyInfo node misses the xmlns: declaration.
&lt;br&gt;After xmlsec1.4.1 C14N this is still available.
&lt;br&gt;&lt;br&gt;Questions here: does the XML doc that goes into C14N misses any
&lt;br&gt;xmlns: declarations at some important positions? If so - where should
&lt;br&gt;we include these?
&lt;br&gt;&lt;br&gt;(The pretty print method uses a normal Transformer to transform a DOMSource
&lt;br&gt;to a StreamResult, no other specific step taken here)
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Werner
&lt;br&gt;&lt;br&gt;&lt;br&gt;Sean Mullan schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I don't know what the cause of this regression could be.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The best thing to do is for Arnaud or Peter to file a new bug at 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://issues.apache.org/bugzilla&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://issues.apache.org/bugzilla&lt;/a&gt;&amp;nbsp;under the Security project and if 
&lt;br&gt;&amp;gt; possible, attach a standalone (i.e. not dependent on WSS4J) test case 
&lt;br&gt;&amp;gt; that reproduces the problem.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Sean
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;/div&gt;&amp;lt;SNIP ----- SNAP&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;- Encrypted message, RSA-15 keytransport, 3DES:
&lt;br&gt;&amp;lt;soapenv:Envelope xmlns:soapenv=&amp;quot;&lt;a href=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/a&gt;&amp;quot; xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot; xmlns:xsd=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot; xmlns:xsi=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;lt;soapenv:Header&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;wsse:Security soapenv:mustUnderstand=&amp;quot;1&amp;quot; xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;wsse:BinarySecurityToken EncodingType=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary&lt;/a&gt;&amp;quot; ValueType=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3&lt;/a&gt;&amp;quot; wsu:Id=&amp;quot;urn:uuid:14795A7D0564B53C9F12224984693941&amp;quot; xmlns:wsse=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/a&gt;&amp;quot; xmlns:wsu=&amp;quot;&lt;a href=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;MIIDNDCCAp2gAwIBAgIBEDANBgkqhkiG9w0BAQQFADBmMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmF5ZXJuMQ8wDQYDVQQHEwZNdW5pY2gxDTALBgNVBAoTBEhvbWUxFTATBgNVBAsTDEFwYWNoZSBXU1M0SjEPMA0GA1UEAxMGV2VybmVyMB4XDTA4MDQwNDE5MzIxOFoXDTEwMDQwNDE5MzIxOFowYTELMAkGA1UEBhMCREUxDzANBgNVBAgTBkJheWVybjEPMA0GA1UEBxMGTXVuaWNoMQ8wDQYDVQQKEwZBcGFjaGUxDjAMBgNVBAsTBVdTUzRKMQ8wDQYDVQQDEwZXZXJuZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAINlL3/k0H/zvknpBtLo8jzXwx/IJU/CGSv6MsqJZ2fyZ6kpLlXCuSBUZ/tfkdxpuzhYq/Sc7A8csIk9gDf9RUbrhK0qKw0VP6DoCIJjS5IeN+NeJkx8YjmzLPmZqLYbNPXr/hy8CRrR6CqLTTSkBwoEJ+cDkfZrdH2/bND0FEIZAgMBAAGjgfYwgfMwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFFSZXv0I5bG7XPEwjylwG3lmZGdiMIGYBgNVHSMEgZAwgY2AFL/FsHHolGIMacU1TZW/88Bd2EL6oWqkaDBmMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmF5ZXJuMQ8wDQYDVQQHEwZNdW5pY2gxDTALBgNVBAoTBEhvbWUxFTATBgNVBAsTDEFwYWNoZSBXU1M0SjEPMA0GA1UEAxMGV2VybmVyggkAuBIOAWJ19mwwDQYJKoZIhvcNAQEEBQADgYEAUiUh/wORVcQYXxIh13h3w2Btg6Kj2g6V6YO0Utc/gEYWwT310C2OuroKAwwoHapMIIWiJRclIAiA8Hnb0Sv/puuHYD4G4NWFdiVjRord90eZJe40NMGruRmlqIRIGGKCv+wv3E6Ux1cWW862f5H9Eyrcocke2P+3GNAGy83vghA= &amp;nbsp; &amp;lt;/wsse:BinarySecurityToken&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;xenc:EncryptedKey Id=&amp;quot;EncKeyId-urn:uuid:14795A7D0564B53C9F12224984694252&amp;quot; xmlns:xenc=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;xenc:EncryptionMethod Algorithm=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/04/xmlenc#rsa-1_5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/04/xmlenc#rsa-1_5&lt;/a&gt;&amp;quot;/&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;ds:KeyInfo xmlns:ds=&amp;quot;&lt;a href=&quot;http://www.w3.org/2000/09/xmldsig#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2000/09/xmldsig#&lt;/a&gt;&amp;quot;