At which point during the processing do you look at the message?
The stream that WSS4J sends over the wire usually does not contain
the duplicate namespaces. During internal processing this is the
normal way to represent namespaces in a DOM (IIRC). Before sending
WSS4J preforms C14N to produce the "real" stream.
Daniel Kulp (JIRA) schrieb:
Better management of namespace declarations....
-----------------------------------------------
Key: WSS-143
URL: https://issues.apache.org/jira/browse/WSS-143
Project: WSS4J
Issue Type: Improvement
Components: WSS4J Handlers
Affects Versions: 1.5.5
Reporter: Daniel Kulp
Assignee: Ruchith Udayanga Fernando
For performance reasons, (and readability) it would be better if wss4j didn't
duplicate namespace decls on all the child elements if they are redundant or
not needed. For example:
<wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="Timestamp-1606023307">
<wsu:Created
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:14:28.841Z</wsu:Created>
<wsu:Expires
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-26T20:19:28.841Z</wsu:Expires>
</wsu:Timestamp>
could be shortened to:
<wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="Timestamp-1606023307">
<wsu:Created>2008-09-26T20:14:28.841Z</wsu:Created>
<wsu:Expires>2008-09-26T20:19:28.841Z</wsu:Expires>
</wsu:Timestamp>
That would save bandwidth, make parsing faster (less to parse/process), the DOM
model smaller in memory, etc...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]