Hi All,
getAllNamespaces builds a map of prefix declarations to namespaces.
However it doesn't account for xml like this:
<wsnt:Message>
<wsrf-rp:ResourcePropertyValueChangeNotification
xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2">
<wsrf-rp:OldValues>
<muws2:State
xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd">
<Running
xmlns="http://swisscom.com/sif/esb/management/runtimeInfo"/>
</muws2:State>
</wsrf-rp:OldValues>
<wsrf-rp:NewValues>
<muws2:State
xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd">
<ShuttingDown
xmlns="http://swisscom.com/sif/esb/management/runtimeInfo"/>
</muws2:State>
</wsrf-rp:NewValues>
</wsrf-rp:ResourcePropertyValueChangeNotification>
</wsnt:Message>
where the states are set with the default namespace. This causes
problems with serialization since according to the spec:
If not specified, the Namespace URI is set to "" (the empty
string). If not specified, the prefix is set to "" (the empty
string).
as such the NotificationMessage has
xmlns:="http://swisscom.com/sif/esb/management/runtimeInfo" added as an
attribute, which is clearly invalid xml.
I would propose changing the put to:
if (prefix.length() > 0) {
namespacesByPrefix.put(prefix, namespace);
}
If this makes sense I can raise a jira issue. For the time being I'll
change my qnames to include prefixes.
cheers,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]