{
webDeployment.addEntry(wsdlDir + schemaEntry.getKey(), schemaEntry.getValue().getBytes());
log.debug("Added schema " + wsdlDir + schemaEntry.getKey());
}
final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(webserviceInfo);
final String wsdl = ESBContractGenerator.generateWSDL(webserviceInfo, serviceInfo, new WebDeploymentClassLoader(localCl, schemasMap));
webDeployment.addEntry(serviceInfo.getWSDLFileName(), wsdl.getBytes("UTF-8"));
final String handlers = JBossDeployerUtil.getHandlers(serviceInfo);
final boolean includeHandlers = (handlers != null);
if (includeHandlers)
{
final String wsHandlerName = "WEB-INF/classes/" + serviceInfo.getPackageName().replace('.', '/') + "/esb-jaxws-handlers.xml";
webDeployment.addEntry(wsHandlerName, handlers.getBytes("UTF-8"));
}
final byte[] wsClass = generator.generate(deploymentName, service.getCategory(),
service.getName(), serviceInfo, includeHandlers);
final String wsClassName = serviceInfo.getClassName().replace('.', '/') + ".class";
webDeployment.addEntry("WEB-INF/classes/" + wsClassName, wsClass);
// Servlet....
final Servlet servlet = new Servlet(serviceInfo.getServletName(), serviceInfo.getClassName(), webDeployment.getWebModel());
servlet.getUrlMappings().add("/ebws" + serviceInfo.getServletPath());
// Filter...
// At the moment we only need the filter to overcome a bug in JBossWS re In-Only endpoints, so
// we only include for one way services...
if(serviceInfo.isOneWay()) {
new Filter(serviceInfo.getServletName() + "_Filter", ESBResponseFilter.class.getName(), servlet);
}
final ContractReferencePublisher publisher = new ESBServiceContractReferencePublisher(service, webserviceInfo.getDescription(), serviceInfo.getServletName());
publishers.add(publisher);
}
}
catch (final Exception ex)
{