final PrintWriter writer = response.getWriter();
writer.write("<?xml version=\"1.0\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body>");
if (result != null) {
final Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE);
m.setProperty("com.sun.xml.internal.bind.namespacePrefixMapper", new PreferredNamespaceMapper());
m.setProperty("jaxb.fragment", Boolean.TRUE);
m.marshal(result, writer);
// m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
// m.marshal(result, System.out);
} else {