Try something like the following ...
SOAPPart soapPart = new SOAPPart();
if (!(xmlSignatureDomElement instanceof SOAPElement)) {
SOAPElement xmlSignatureSoapElement = (SOAPElement) soapPart.importNode(xmlSignatureDomElement, true);
}
Then try adding the xmlSignatureSoapElement to the SOAPHeader.
Regards, Vishal
Stephen Chell (DSL AK) wrote:
I'm using the SAAJ library to create a SOAP with attachments message, and I want to place an XML signature in the SOAP Header.
I presume adding a signature to the SOAP Body would be easy enough, using javax.xml.soap.SOAPBody.addDocument(org.w3c.dom.Document document), but the SOAPHeader interface doesn't appear to have an equivalent method.
Any suggestions how to achieve this?
Thanks in advance ...
Steve