}
//Generate the webservices.xml file
if (j2wc.wsxmlFileNeeded)
{
WebservicesXMLCreator wscr = new WebservicesXMLCreatorImpl();
wscr.setTargetNamespace(j2wc.targetNamespace);
//wscr.setLocation(new File(outDir).toURL());
wscr.setSeiName(j2wc.endpointName);
wscr.setServiceName(j2wc.serviceName);
//Get the portname from wsdl definitions
WSDLService wsdlService = wsdl.getService(j2wc.serviceName);
String portName = wsdlService.getEndpoints()[0].getName().getLocalPart();
//wscr.setPortName(j2wc.serviceName + "Port");
wscr.setPortName(portName);
//wscr.setMappingFileName(j2wc.mappingFileName);
if (j2wc.servletLink != null)
{
wscr.setMappingFile("WEB-INF/" + j2wc.mappingFileName);
wscr.setWsdlFile("WEB-INF/wsdl/" + j2wc.serviceName + ".wsdl");
wscr.setServletLink(j2wc.servletLink);
}
else
{
wscr.setMappingFile("META-INF/" + j2wc.mappingFileName);
wscr.setWsdlFile("META-INF/wsdl/" + j2wc.serviceName + ".wsdl");
wscr.setEjbLink(j2wc.ejbLink);
}
wscr.setAppend(j2wc.wsxmlFileAppend);
wscr.generateWSXMLDescriptor(new File(outDir + "/webservices.xml"));
}
}