if ( currentForm == FORM_INPUTSTREAM ) {
is = new InputSource( (InputStream) currentMessage );
} else {
is = new InputSource(new StringReader(getAsString()));
}
DeserializationContext dser =
new DeserializationContextImpl(is, getMessage().getMessageContext(), getMessage().getMessageType());
// This may throw a SAXException
try {
dser.parse();
} catch (SAXException e) {
Exception real = e.getException();
if (real == null)
real = e;
throw AxisFault.makeFault(real);
}
setCurrentMessage(dser.getEnvelope(), FORM_SOAPENVELOPE);
log.debug(JavaUtils.getMessage(
"exit00", "SOAPPart::getAsSOAPEnvelope"));
return (SOAPEnvelope)currentMessage;
}