code: public Endpoint publishEndpoint(String path, Object service, BasicAuthentication auth,
                                  SessionFactory sessionFactory) {
          checkArgument(service != null, "Service is null");
          checkArgument(path != null, "Path is null");
          checkArgument((path).trim().length() > 0, "Path is empty");
          return this.publishEndpoint(new EndpointBuilder(path, service)
                  .authentication(auth)
                  .sessionFactory(sessionFactory)
          );
      }
docs: Publish JAX-WS protected endpoint using Dropwizard BasicAuthentication with Dropwizard Hibernate Bundle
  integration. Service is scanned for @UnitOfWork annotations. EndpointBuilder is published relative to the CXF
  servlet path.
  @param path Relative endpoint path.
  @param service Service implementation.
  @param auth BasicAuthentication implementation.
  @param sessionFactory Hibernate session factory.
  @return javax.xml.ws.Endpoint
  
  @deprecated Use the {@link #publishEndpoint(EndpointBuilder)} publishEndpoint} method instead.