LOG.debug("Service " + serviceName + " does not have WSDL. Generating WSDL...");
WsdlGenerator wsdlGenerator = getWsdlGenerator();
WsdlGeneratorOptions options = new WsdlGeneratorOptions();
options.setSAAJ(WsdlGeneratorOptions.SAAJ.SUN);
JaxWsImplementorInfo serviceInfo = new JaxWsImplementorInfo(serviceClass);
// set wsdl service
if (portInfo.getWsdlService() == null) {
options.setWsdlService(serviceInfo.getServiceName());
} else {
options.setWsdlService(portInfo.getWsdlService());
}
// set wsdl port
if (portInfo.getWsdlPort() != null) {
options.setWsdlPort(portInfo.getWsdlPort());
}
String wsdlFile = wsdlGenerator.generateWsdl(module, serviceClass.getName(), module.getEarContext(), options);
portInfo.setWsdlFile(wsdlFile);