ByteArrayOutputStream out = new ByteArrayOutputStream();
OutMessage message = new OutMessage("urn:bleh");
message.setBody(fault);
XMLStreamWriter writer = STAXUtils.createXMLStreamWriter(out, "UTF-8",null);
writer.writeStartDocument();
writer.writeStartElement("soap", "Body", Soap12.getInstance().getNamespace());
writer.setPrefix("soap", Soap12.getInstance().getNamespace());
writer.writeNamespace("soap", Soap12.getInstance().getNamespace());
soap12.writeMessage(message, writer, new MessageContext());
writer.writeEndElement();
writer.writeEndDocument();
writer.close();
Document doc = readDocument(out.toString());
//printNode(doc);
addNamespace("s", Soap12.getInstance().getNamespace());
assertValid("//s:SubCode/s:Value[text()='m:NotAvailable']", doc);