It seems it has been fixed on the trunk http://svn.apache.org/viewvc?view=revision&revision=520165
and I was using 1.4 tag Working with a dead obsolete project and having to chase bugs like this is a real pain, so hopefully this is useful to some poor soul searching the mail archives in the future... George From: George Stanchev [mailto:gstanc...@serena.com] Sent: Friday, March 23, 2012 3:58 PM To: java-user@axis.apache.org Subject: RE: namespace prefixes I traced the chain of unfortunate events and I was wondering if any of the XML gurus can advice on the problem. The XML being broken is a SAML statement. I originally get it in the form <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" ... Then in my code I use a native OpenSAML assertion object to get a hold of it and then finally I toDOM() it out there into Axiom object. The old OpenSAML 1.1 library plants the DOM root and adds the following attributes: xmlns, xmlns:saml and some more irrelevant. Both those contain the SAML 1.0 namespace. Now, when I serialize it into string the assertion looks lile <saml:Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"... However when it hits the wire it serialized as <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns="urn:oasis:names:tc:SAML:1.0:assertion"... I stepped through the SAX parser and SerializationContext of Axis 1.4 and I see first it registers the "saml" prefix against "urn:oasis:names:tc:SAML:1.0:assertion" and then "" against the same namespace... The questions I have, is it possible both NS attribute declarations (in the xmlns:saml; xmlns order) to cause the XML to be serialized with the saml: prefix stripped and if so, is there any way to force Axiom to either change the ordering (on the client side). George From: George Stanchev [mailto:gstanc...@serena.com] Sent: Thursday, March 22, 2012 9:54 PM To: java-user@axis.apache.org Subject: namespace prefixes Hi, Using axis 1.4 as a service provider (server side) for a legacy project and elements of the inbound messages are coming with prefixes all defaulted (i.e. on the wire, the message element is <saml:Assertion xmlns:saml="...> whereas the element pulled by "Message requestMessage = messageContext.getRequestMessage();SOAPEnvelope requestEnvelope = requestMessage.getSOAPEnvelope(); ") comes with the element as "<Assertion xmlns="...>. This is breaking the verification of some signatures. Is there any flag, property, wsdd setting, etc that would allow me to preserve the prefixes as they were on the wire? George