* @throws ServletException if any Servlet exception
* @throws IOException if the streams could not be written or read
*/
public void handle(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpRequestBindingData httpRequest = new HttpRequestBindingData();
try {
httpRequest.setContentType(new ContentType(request.getContentType()));
httpRequest.setBodyFromStream(request.getInputStream());
for (Enumeration<String> headerNames = request.getHeaderNames(); headerNames.hasMoreElements();) {
String name = headerNames.nextElement();
for (Enumeration<String> values = request.getHeaders(name); values.hasMoreElements();) {
String value = values.nextElement();
httpRequest.addHeader(name, value);
}
}
httpRequest.setRequestInfo(getRequestInfo(request));
} catch (IOException e) {
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
HttpLogger.ROOT_LOGGER.unexpectedExceptionWhileReadingRequest(e);
}
ClassLoader origCl = null;