throw (Fault) message.getContent(Exception.class);
}
Fault f = (Fault) message.getContent(Exception.class);
message.put(org.apache.cxf.message.Message.RESPONSE_CODE, f.getStatusCode());
NSStack nsStack = new NSStack();
nsStack.push();
XMLStreamWriter writer = message.getContent(XMLStreamWriter.class);
XMLFault xmlFault = XMLFault.createFault(f);
try {
nsStack.add(XMLConstants.NS_XML_FORMAT);
String prefix = nsStack.getPrefix(XMLConstants.NS_XML_FORMAT);
StaxUtils.writeStartElement(writer, prefix, XMLFault.XML_FAULT_ROOT,
XMLConstants.NS_XML_FORMAT);
StaxUtils.writeStartElement(writer, prefix, XMLFault.XML_FAULT_STRING,
XMLConstants.NS_XML_FORMAT);
Throwable t = xmlFault.getCause();