try
{
// Get the deployment model factory
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
WSFRuntimeLocator locator = spiProvider.getSPI(WSFRuntimeLocator.class);
WSFRuntime runtime = locator.locateRuntime("EndpointAPIRuntime");
DeploymentModelFactory depModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
// Create/Setup the deployment
Deployment dep = depModelFactory.newDeployment("endpoint-deployment", implClass.getClassLoader());