if ( currentForm == FORM_FAULT ) {
StringWriter writer = new StringWriter();
AxisFault env = (AxisFault)currentMessage;
try {
env.output(new SerializationContextImpl(writer, getMessage().getMessageContext()));
} catch (Exception e) {
log.error(JavaUtils.getMessage("exception00"), e);
return null;
}
setCurrentMessage(writer.getBuffer().toString(), FORM_STRING);
log.debug("Exit: SOAPPart::getAsString(): " + currentMessage);
return (String)currentMessage;
}
if ( currentForm == FORM_SOAPENVELOPE ) {
StringWriter writer = new StringWriter();
SOAPEnvelope env = (SOAPEnvelope)currentMessage;
try {
env.output(new SerializationContextImpl(writer, getMessage().getMessageContext()));
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
setCurrentMessage(writer.getBuffer().toString(), FORM_STRING);
log.debug("Exit: SOAPPart::getAsString(): " + currentMessage);