AxisFault fault = new AxisFault("<code>", "<string>", "<actor>", null);
fault.setFaultDetailString("<detail>");
AxisServer server = new AxisServer();
Message message = new Message(fault);
message.setMessageContext(new MessageContext(server));
String data = message.getSOAPPartAsString();
assertTrue("Fault code not encoded correctly",
data.indexOf("<code>")>=0);
assertTrue("Fault string not encoded correctly",
data.indexOf("<string>")>=0);
assertTrue("Fault actor not encoded correctly",
data.indexOf("<actor>")>=0);
assertTrue("Fault detail not encoded correctly",
data.indexOf("<detail>")>=0);