axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <>
Subject RE: Namespace prefix mangling problem
Date Fri, 10 Aug 2001 16:40:58 GMT

> 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.

Right - I just fixed this by marking the beginning of the recorded
SAX events for a MessageElement at the first prefix mapping, rather
than at the actual startElement.

> 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.

The reason is that the HeaderBuilder is reacting to the <SOAP-ENV:
Header> element.  Thus, the startElement() it receives is not for
each individual header, it's just the outer wrapper.  When the
headers inside <SOAP-ENV:Header> begin, that's when onStartChild()
gets called, and that's the right time to create the SOAPHeaders.
Doing it the way you have it will result in exactly one SOAPHeader
for any SOAP message with headers...

Let me know if my commit fixed your problem.


View raw message