Class serviceImpl, Object serviceInstance) {
// TODO: This check should be based on the EndpointDescription processing of annotations
// It is left this way for now because some tests have an @WebService annotation on
// Provider-based endpoints as a pre-existing workaround.
if (Provider.class.isAssignableFrom(serviceImpl)) {
return new ProviderDispatcher(serviceImpl, serviceInstance);
} else {
return new JavaBeanDispatcher(serviceImpl, serviceInstance);
}
}