You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Kent Tong <ke...@cpttm.org.mo> on 2004/12/06 07:50:07 UTC
getHeadersByActor returns invalid element?
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!