Buggy code:
public final class EndpointPublisherImpl implements EndpointPublisher { private Host host ; public EndpointPublisherImpl ( Host host ) { } @ Override public Context publish ( String context , ClassLoader loader , Map < String , String > urlPatternToClassNameMap ) throws Exception { } public Context publish ( ServiceTarget target , String context , ClassLoader loader , Map < String , String > urlPatternToClassNameMap ) throws Exception { } public List < Endpoint > publish ( ServiceTarget target , EndpointPublisherImpl . WSEndpointDeploymentUnit unit ) throws Exception { List < DeploymentAspect > aspects = DeploymentAspectsProvider . getSortedDeploymentAspects ( ) ; ClassLoader origClassLoader = SecurityActions . getContextClassLoader ( ) ; Deployment dep = null ; try { SecurityActions . setContextClassLoader ( ClassLoaderProvider . getDefaultProvider ( ) . getServerIntegrationClassLoader ( ) ) ; <START_BUG> WSDeploymentBuilder . getInstance ( ) . build ( unit , JAXWS_JSE ) ; <END_BUG> dep = unit . getAttachment ( DEPLOYMENT_KEY ) ; dep . addAttachment ( ServiceTarget . class , target ) ; DeploymentAspectManager dam = new DeploymentAspectManagerImpl ( ) ; dam . setDeploymentAspects ( aspects ) ; dam . deploy ( dep ) ; } finally { if ( dep != null ) { dep . removeAttachment ( ServiceTarget . class ) ; } SecurityActions . setContextClassLoader ( origClassLoader ) ; } Deployment deployment = unit . getAttachment ( DEPLOYMENT_KEY ) ; deployment . addAttachment ( StandardContext . class , EndpointPublisherImpl . startWebApp ( host , unit ) ) ; return deployment . getService ( ) . getEndpoints ( ) ; } private static StandardContext startWebApp ( Host host , EndpointPublisherImpl . WSEndpointDeploymentUnit unit ) throws Exception { } private static void addServlets ( JBossWebMetaData jbwebMD , StandardContext context ) { } @ Override public void destroy ( Context context ) throws Exception { } private static void stopWebApp ( StandardContext context ) throws Exception { } private static class LocalInstanceManager implements InstanceManager { LocalInstanceManager ( ) { } @ Override public Object newInstance ( String className ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , InvocationTargetException , NamingException { } @ Override public Object newInstance ( String fqcn , ClassLoader classLoader ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , InvocationTargetException , NamingException { } @ Override public Object newInstance ( Class < ? > c ) throws IllegalAccessException , InstantiationException , InvocationTargetException , NamingException { } @ Override public void newInstance ( Object o ) throws IllegalAccessException , InvocationTargetException , NamingException { } @ Override public void destroyInstance ( Object o ) throws IllegalAccessException , InvocationTargetException { } } public static class WSEndpointDeploymentUnit extends SimpleAttachable implements DeploymentUnit { private String deploymentName ; public WSEndpointDeploymentUnit ( ClassLoader loader , String context , Map < String , String > urlPatternToClassName ) { } private void addEndpoint ( JBossWebMetaData jbossWebMetaData , String className , String urlPattern ) { } @ Override public ServiceName getServiceName ( ) { } @ Override public DeploymentUnit getParent ( ) { } @ Override public String getName ( ) { } @ Override public ServiceRegistry getServiceRegistry ( ) { } @ Override public ModelNode getDeploymentSubsystemModel ( String subsystemName ) { } @ Override public ModelNode createDeploymentSubModel ( String subsystemName , PathElement address ) { } } }

Fix:
WSDeploymentBuilder . getInstance ( ) . build ( unit ) ;