I added Header.getAttribute() as requested by the security team. Venu
said he needed to use it to access attributes like wsu:Id.
Since this can be used to implement methods like getRole(), isRelay(),
and so on, I added AbstractHeaderImpl that does just that. For most of
the outbound messages, those methods will never be invoked, so it makes
sense for messages like JAXBMessage and SourceMessage to use this to
reduce the code size.
I left StreamMessage as-is, since for this class it's almost guaranteed
that the isMustUnderstand method and getRole() will be invoked. It will
be better to scan the attributes once to pick up those messages, as
opposed to scan Attributes twice to find them.
I couldn't fix SourceMessage quickly (and I think it needs to be changed
anyway ---- see my other e-mail), so I left a dummy implementation there
just to make it compile.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com