return factory.createMessage(null, inputStream);
}
public void testEncodeMessageWithNonceAndCreated() throws Exception
{
WSSecurityConfiguration configuration = WSSecurityOMFactory.newInstance().parse(new StringReader(clientConf));
ByteArrayInputStream inputStream = new ByteArrayInputStream(testMessage.getBytes());
MessageFactory factory = new MessageFactoryImpl();
SOAPMessage soapMsg = factory.createMessage(null, inputStream);
sec.encodeMessage(configuration, soapMsg, null, "kermit", "therealfrog");
Element securityEl = (Element)soapMsg.getSOAPHeader().getChildElements(Constants.WSSE_HEADER_QNAME).next();