I apologize for being such a mess. Of course, the version Axiom I am using is 1.2.7, not 1.2.8. Stupid me. It turned out I was also unable to reproduce the problem when running the test snippet locally. The problem is perfectly reproducible, though, when code is executed inside the WebLogic Server 9.2 MP1 container. In fact, the following bit is pretty sufficient for triggering the problem.
AxiomSoapMessageFactory messageFactory = new AxiomSoapMessageFactory();
SoapMessage message = (SoapMessage) messageFactory.createWebServiceMessage();
QName n1 = new QName("http://schemas.xmlsoap.org/ws/2004/08/addressing", "To", "wsa");
QName n2 = new QName("http://schemas.xmlsoap.org/ws/2004/08/addressing", "Action", "wsa");
SoapHeaderElement he1 = message.getEnvelope().getHeader().addHeaderElement(n1);
SoapHeaderElement h2 = message.getEnvelope().getHeader().addHeaderElement(n2);
I am no longer sure whether this is an Axiom issue at all, or Axiom simply ends up picking up a different implementation of some standard API when run inside an WLS container.
Anyways, this issue has no longer anything to do with Spring WS
> True. I will fix it, and consider that the fix of this issue, if that's OK with you.
That would be perfectly fine with me.
> This is actually Axiom doing it's thing. Whenever you call createSOAPFaultCode() on an Axiom SOAPFactory, it adds the namespace
> of the code at the fault level
I believe there is also an explicit call to SOAPFault#declareNamespace in the AxiomSoap12Fault#setValueText. I think AxiomSoapHeader#addHeaderElement ought to behave similarly.
Thank you so much