try {
SecurityActions.setContextClassLoader(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
WSDeploymentBuilder.getInstance().build(unit);
dep = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);
dep.addAttachment(ServiceTarget.class, target);
DeploymentAspectManager dam = new DeploymentAspectManagerImpl();
dam.setDeploymentAspects(aspects);
dam.deploy(dep);
// [JBWS-3441] hack - fallback JAXWS invocation handler for dynamically generated deployments
for (Endpoint ep : dep.getService().getEndpoints()) {
ep.setState(EndpointState.STOPPED);
ep.setInvocationHandler(new InvocationHandlerJAXWS());
ep.setState(EndpointState.STARTED);