// Get the deployment model factory
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
DeploymentModelFactory depModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
// Create/Setup the deployment
Deployment dep = depModelFactory.newDeployment("endpoint-deployment", implClass.getClassLoader());
dep.setRuntimeClassLoader(dep.getInitialClassLoader());
// Create/Setup the service
Service service = dep.getService();
service.setContextRoot(context.getContextRoot());
// Create/Setup the endpoint
org.jboss.wsf.spi.deployment.Endpoint ep = depModelFactory.newEndpoint(implClass.getName());
service.addEndpoint(ep);