SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();
Document doc = env.getOwnerDocument();
String inputString = DOMWriter.printNode(soapMsg.getSOAPPart(), true);
SecurityEncoder encoder = new SecurityEncoder(buildOperations(), new SecurityStore());
encoder.encode(doc);
log.debug("Encoded message:" + DOMWriter.printNode(doc, true));
ByteArrayOutputStream stream = new ByteArrayOutputStream();
soapMsg.writeTo(stream);
ByteArrayInputStream instream = new ByteArrayInputStream(stream.toByteArray());
soapMsg = factory.createMessage(null, instream);
env = soapMsg.getSOAPPart().getEnvelope();
doc = env.getOwnerDocument();
SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), null, null, null);
decoder.decode(doc);
decoder.verify(buildRequireOperations());
decoder.complete();
cleanupWsuIds(doc.getDocumentElement());