You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by David Melgar <dm...@us.ibm.com> on 2001/08/09 23:38:27 UTC

Namespace prefix mangling problem

Regarding the namespace prefix mangling, I may have found the problem. I've
been starting at this too long, still dont quite understand it, so my logic
is likely to be faulty, but might help you folks.

The events for startPrefixMapping occur before the element that contains
them. In the case of the message I'm working with, SOAP-SEC prefix is
defined within a <signature> element, but the event occurs before
startElement(signature) event. This mean that the SOAP header object
essentially needs to store the event.

However, HeaderBuilder create a SOAPHeader onChildStart, in this case when
signature is found. SOAPHeader ends up marking that as the start event
index.

What I think has happened, is that any events between the onChildStart that
created the SOAPHeader, and the onChildStart for the signature, are
essentially lost (ignored).

What I did as a fix, was change HeaderBuilder so that the SOAPHeader create
occurs during HeaderBuilder.startElement. I don't understand the reasons
its not normally done this way.

End result, the namespace prefixes are not mangled. Have to admit, I've
mucked with so much code, it could be something else that also affected it,
but I dont think so.

Attached is the modified HeaderBuilder.
(See attached file: HeaderBuilder.java)

David Melgar
Web Services Toolkit Development
Emerging Technologies
dmelgar@us.ibm.com