@SuppressWarnings("deprecation")
@Test
public void testSerializeExceptionToXML_SOAP11()
                        throws Exception {

    SOAP11Factory factory = new SOAP11Factory();
    XMLExceptionSerializer detailSerializer = new OWS110ExceptionReportSerializer( new Version( 2, 0, 0 ) );
    SOAPExceptionSerializer soapExceptionSerializer = new SOAPExceptionSerializer( factory.getSOAPVersion(), null,
                                                                                   factory, detailSerializer );
    SOAPException soapException = createException();
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter( stream );
    writer.writeStartDocument();
    soapExceptionSerializer.serializeExceptionToXML( writer, soapException );
    writer.writeEndDocument();
    writer.close();
}