In a jax-ws web service I cannot directly access the JaxbContext object. JaxbContext uses the class ObjectFactory. I tried extending it (like in Jaxb Adding Behaviors). I put generated code in ObjectFactoryBase
, then added
public class ObjectFactory extends ObjectFactoryBase {//.. overriden methods}
However IllegalAnnotationsException
came up when publishing to weblogic, because it cannot find a certain @XmlElementDecl
present in ObjectFactoryBase
. When I move the method with this @XmlElementDecl
to ObjectFactory
it works.
No luck with adding @XmlSeeAlso({ ObjectFactoryBase.class })
either.
Edit: I now discovered that the generated ObjectFactory is not even used by the jaxws web service. So the above error message are not so relevant any more. Any idea why it is generated but not used?
Any ideas?