contextMatchOnExact())
: qh.isRecognizedQuery(requestURL, pathInfo, endpointInfo);
if (recognized) {
//replace the endpointInfo address with request url only for get wsdl
String errorMsg = null;
CachedOutputStream out = new CachedOutputStream();
try {
synchronized (endpointInfo) {
String oldAddress = updateEndpointAddress(reqAddr);
resp.setContentType(qh.getResponseContentType(requestURL, pathInfo));
try {
qh.writeResponse(requestURL, pathInfo, endpointInfo, out);
} catch (Exception ex) {
LOG.log(Level.WARNING, "writeResponse failed: ", ex);
errorMsg = ex.getMessage();
}
endpointInfo.setAddress(oldAddress);
}
if (errorMsg != null) {
resp.sendError(500, errorMsg);
} else {
out.writeCacheTo(resp.getOutputStream());
resp.getOutputStream().flush();
}
} finally {
out.close();
}
baseRequest.setHandled(true);
return;
}
}