This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?