/**
* This requirement came from the jbi team. If the WebServiceEndpoint
* is a jbi endpoint which is private throw an error whenever a get
* or a post request is made
*/
Endpoint endpt = wsEngine_.getEndpoint(request.getServletPath());
if((endpt != null) ) {
if ((endpt.getDescriptor() != null) && (endpt.getDescriptor().isJBIPrivate())) {
String message = endpt.getDescriptor().getWebService().getName() +
" is a JBI private service; Access is denied.";
response.setContentType("text/xml");
(new WsUtil()).writeInvalidMethodType(response, message);
return;
}
}
if (("Tester".equalsIgnoreCase(request.getQueryString())) &&
(!(HTTPBinding.HTTP_BINDING.equals(endpoint.getProtocolBinding())))) {
if((endpt != null) && ((endpt.getDescriptor().isSecure()) ||
(endpt.getDescriptor().getMessageSecurityBinding() != null) ||
endpoint.hasSecurePipeline())) {
String message = endpt.getDescriptor().getWebService().getName() +
"is a secured web service; Tester feature is not supported for secured services";
(new WsUtil()).writeInvalidMethodType(response, message);
return;
}
if (endpt != null) {
if ((endpt.getDescriptor() != null) && (endpt.getDescriptor().isJBIPrivate())) {
String message = endpt.getDescriptor().getWebService().getName() +
" is a JBI private service; Access is denied.";
response.setContentType("text/xml");
(new WsUtil()).writeInvalidMethodType(response, message);
return;
}
}
if (endpt!=null && Boolean.parseBoolean(endpt.getDescriptor().getDebugging())) {
Loader loader = (Loader) endpt.getDescriptor().getBundleDescriptor().getExtraAttribute("WEBLOADER");
if (loader != null) {
endpt.getDescriptor().getBundleDescriptor().setClassLoader(loader.getClassLoader());
endpt.getDescriptor().getBundleDescriptor().removeExtraAttribute("WEBLOADER");
}
WebServiceTesterServlet.invoke(request, response,
endpt.getDescriptor());
return;
}
}
// If it is not a "Tester request" and it is not a WSDL request,