public void writeTo(Writer writer) throws IOException {
if ( currentForm == FORM_FAULT ) {
AxisFault env = (AxisFault)currentMessage;
try {
env.output(new SerializationContextImpl(writer, getMessage().getMessageContext()));
} catch (Exception e) {
log.error(Messages.getMessage("exception00"), e);
throw env;
}
return;
}
if ( currentForm == FORM_SOAPENVELOPE ) {
SOAPEnvelope env = (SOAPEnvelope)currentMessage;
try {
env.output(new SerializationContextImpl(writer, getMessage().getMessageContext()));
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
return;
}