I'm looking at some sample Soap client code that's using JAXB for
serialization.
It's using the JAXB @Xml annotations, to set the schema among other
things. It's calling javax.xml.bind.Marshaller.marshal() manually, but
when it constructs the JAXBElement it's reading the "@XmlSchema"
annotation from the package to get the namespace. In order to do this
efficiently, it has to cache the class-namespace mapping in a map
protected by a synchronized block. Are there any reasonable
alternatives to this strategy?
I guess this is a good reason to use CXF, which hides this cruft.