}
else
{
final String fullContentType = request.getContentType() ;
final String contentType = HttpUtils.getContentType(fullContentType) ;
final SoapProcessor soapProcessor = getSoapProcessor(soapService, contentType) ;
if (soapProcessor == null)
{
response.setStatus(UNKNOWN_CONTENT_TYPE_STATUS) ;
if (UNKNOWN_CONTENT_TYPE_CONTENT != null)
{
response.getWriter().print(UNKNOWN_CONTENT_TYPE_CONTENT) ;
}
}
else
{
final String action = getHeader(request, HttpUtils.SOAP_ACTION_HEADER) ;
final MessageContext messageContext = new MessageContext() ;
initialiseContext(messageContext, request) ;
final MessageContext messageResponseContext = new MessageContext() ;
final Reader input = request.getReader() ;
final String contents = HttpUtils.readAll(input) ;
final Reader reader = new StringReader(contents) ;
if (logPackets)
{
SoapMessageLogging.appendThreadLog(contents) ;
}
final SoapMessage soapResponse ;
try
{
soapResponse = soapProcessor.process(messageContext,
messageResponseContext, action, reader) ;
}
finally
{
if (logPackets)