SoapMarshaler marshaler = new SoapMarshaler(true, true);
SoapMessage msg = new SoapMessage();
Context ctx = new Context();
ctx.setInMessage(msg);
msg.setSource(new StringSource("<hello>world</hello>"));
SoapWriter writer = marshaler.createWriter(ctx.getInMessage());
W3CDOMStreamWriter domWriter = new W3CDOMStreamWriter();
writer.writeSoapEnvelope(domWriter);
ctx.getInMessage().setDocument(domWriter.getDocument());
StandaloneCrypto crypto = new StandaloneCrypto();