for(WebServiceEndpoint nextEndpoint : endpoints) {
WebComponentDescriptor webComp = nextEndpoint.getWebComponentImpl();
if( !nextEndpoint.hasServletImplClass() ) {
throw new DeploymentException( format(rb.getString(
LogUtils.DEPLOYMENT_BACKEND_CANNOT_FIND_SERVLET),
nextEndpoint.getEndpointName()));
}
if (nextEndpoint.hasEndpointAddressUri()) {
webComp.getUrlPatternsSet().clear();
webComp.addUrlPattern(nextEndpoint.getEndpointAddressUri());
}
if( !nextEndpoint.getWebService().hasFilePublishing() ) {
String publishingUri = nextEndpoint.getPublishingUri();
String publishingUrlPattern =
(publishingUri.charAt(0) == '/') ?publishingUri : "/" + publishingUri + "/*";
webComp.addUrlPattern(publishingUrlPattern);
}
String servletImplClass = nextEndpoint.getServletImplClass();
try {
Class servletImplClazz = cl.loadClass(servletImplClass);
String containerServlet;
if(wsutil.isJAXWSbasedService(nextEndpoint.getWebService())) {
containerServlet = "org.glassfish.webservices.JAXWSServlet";
addWSServletContextListener(webBunDesc);
} else {
containerServlet =
SingleThreadModel.class.isAssignableFrom(servletImplClazz) ?
"org.glassfish.webservices.SingleThreadJAXRPCServlet" :
"org.glassfish.webservices.JAXRPCServlet";
}
webComp.setWebComponentImplementation(containerServlet);
} catch(ClassNotFoundException cex) {
throw new DeploymentException( format(rb.getString(
LogUtils.DEPLOYMENT_BACKEND_CANNOT_FIND_SERVLET),
nextEndpoint.getEndpointName()));
}
/**