}
// generate provider impl
WebServiceProviderGenerator providerFactory = new WebServiceProviderGenerator();
BaseWebServiceEndpoint providerImpl =
providerFactory.createProvider(metaData, wsdlRef, classLoader,
handlerFilePath, ODEWebServiceFactory.class);
log.debug("Created dynamic endpoint class " + providerImpl.getClass().getName());
// create deployment structure (maybe replaced by shrinkwrap)
File warArchive = new DeploymentBuilder(serverConfig)
.setEndpoint(metaData.getEndpointId())
.setWSDL(wsdlFile, root)
.setProvider(providerImpl)
.process(new JBossWSCXFBuildProcessor(providerImpl))
.build();
if (!stableInterface) {
// Undeploy
try {
log.debug("Check if can remove existing service: "+metaData.getServiceName()+":"+metaData.getPortName());
removeEndpoint(metaData.getServiceName(), metaData.getPortName());
} catch(IllegalStateException ise) {
// Ignore for now - endpoint may not exist if first version
}
}
URL serviceUrl = new WSDLParser(wsdlRef.getDefinition()).getServiceLocationURL(metaData.getServiceName(), metaData.getPortName());
ServiceEndpointReference ref = JBossDSPFactory.getServiceDeployer().deploy(metaData, providerImpl.getClass(),
serviceUrl, classLoader, warArchive, serverConfig);
/*
//Deployment deployment = createInMemoryDeployment(endpointId);
Deployment deployment = createVFSDeployment(warArchive);