logger.debug( "Setting Base URI "
+ baseURI.toExternalForm() );
}
pipelineContext.pushBaseURI( baseURI.toExternalForm() );
} catch( MalformedURLException e ) {
throw new MessageException( e );
}
reader.parse( new InputSource( new StringReader( messageXML ) ) );
MPSApplicationContext applicationContext =
(MPSApplicationContext)ContextInternals.getApplicationContext(
requestContext );
applicationContext.getAssetMap();
// set charset type for content
String contentType = getContentTypeHeader(
internalResponse.getContentType(),
characterEncoding);
rawMessage = new ProtocolIndependentMessage(
internalResponse.getResponseAsString(),
contentType,
applicationContext.getAssetMap(),
characterEncoding);
rawMessage.setBaseURL( new URL( baseUrl ) );
rawMessage.setMaxFileSize( applicationContext.getMaxFileSize() );
rawMessage.setMaxMMSize( applicationContext.getMaxMMSize() );
requestContext.release();
} catch (SAXException se) {
Exception cause = se.getException();
// Check the root cause of the SAXException, as it may not be
// logged correctly.
if (cause != null) {
logger.error("sax-exception-caught", cause);
}
throw new MessageException(
localizer.format("error-parsing-xdime"),
se);
} catch (Throwable e) {
throw new MessageException(e);
}
return rawMessage;
}