webServiceContainer.getWsdl(request, response);
//WHO IS RESPONSIBLE FOR CLOSING OUT?
} catch (IOException e) {
throw e;
} catch (Exception e) {
throw (HttpException) new HttpException(500, "Could not fetch wsdl!").initCause(e);
}
} else {
if (isConfidentialTransportGuarantee) {
if (!req.isConfidential()) {
throw new HttpException(403);
}
} else if (isIntegralTransportGuarantee) {
if (!req.isIntegral()) {
throw new HttpException(403);
}
}
Thread currentThread = Thread.currentThread();
ClassLoader oldClassLoader = currentThread.getContextClassLoader();
currentThread.setContextClassLoader(classLoader);
try {
if (authenticator != null) {
String pathInContext = org.mortbay.util.URI.canonicalPath(req.getPath());
if (authenticator.authenticate(realm, pathInContext, req, res) == null) {
throw new HttpException(403);
}
}
try {
webServiceContainer.invoke(request, response);
req.setHandled(true);
} catch (IOException e) {
throw e;
} catch (Exception e) {
throw (HttpException) new HttpException(500, "Could not process message!").initCause(e);
}
} finally {
currentThread.setContextClassLoader(oldClassLoader);
}
}