I am trying to sign a SOAP message using wssj. I need to pass the soap envelope as a Document type. I tried doing this: SOAPMessageContext soapCntxt = (SOAPMessageContext)context; SOAPMessage message = soapCntxt.getMessage(); SOAPPart soapPart = message.getSOAPPart(); Document envelope = (Document)soapPart;
Also, if the SOAPMessage is created from a file input stream with the below content, the tested version of the code pasted above does not seem to work. Is there a way to just get the XML part ignoring the rest?