axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kent Tong <k...@cpttm.org.mo>
Subject getHeadersByActor returns invalid element?
Date Mon, 06 Dec 2004 06:50:07 GMT
Hi,

I'm working on a handler that verifies XML signatures. I use the
following code to get the XML signature element:

SOAPEnvelope env =
    (SOAPEnvelope) msgContext.getMessage().getSOAPPart().getEnvelope();
Document doc = env.getAsDocument();
doc.getElementsByTagNameNS("*", "Signature").item(0);

It is working fine. But if I change the code to:

SOAPEnvelope env =
    (SOAPEnvelope) msgContext.getMessage().getSOAPPart().getEnvelope();
ArrayList actors = ...;
SOAPHeaderElement soapSignatureHeader =
    (SOAPHeaderElement) env.getHeadersByActor(actors).get(0);
soapSignatureHeader.getAsDOM().getElementsByTagNameNS(
    "*", "Signature").item(0);

Then the checkSignatureValue method will return false. Another
strange behavior is that checkSignatureValue out a success
message '- Verification successful for URI "#Body"' to the log.

What's wrong?

TIA!

Mime
View raw message