javax.xml.ws.spi.Provider.provider()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(253)

本文整理了Java中javax.xml.ws.spi.Provider.provider()方法的一些代码示例,展示了Provider.provider()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Provider.provider()方法的具体详情如下:
包路径:javax.xml.ws.spi.Provider
类名称:Provider
方法名:provider

Provider.provider介绍

[英]Creates a new provider object.

The algorithm used to locate the provider subclass to use consists of the following steps:

  • Use the service-provider loading facilities, defined by the java.util.ServiceLoader class, to attempt to locate and load an implementation of javax.xml.ws.spi.Provider service using the java.util.ServiceLoader#load(java.lang.Class).
  • Use the configuration file "jaxws.properties". The file is in standard java.util.Properties format and typically located in the conf directory of the Java installation. It contains the fully qualified name of the implementation class with the key javax.xml.ws.spi.Provider.
  • If a system property with the name javax.xml.ws.spi.Provideris defined, then its value is used as the name of the implementation class.
  • Finally, a platform default implementation is used.
    [中]创建一个新的提供者对象。
    用于定位要使用的提供者子类的算法包括以下步骤:
    *使用java语言定义的服务提供者加载工具。util。ServiceLoader类,尝试定位和加载javax的实现。xml。ws。spi。使用java的提供者服务。util。ServiceLoader#load(java.lang.Class)。
    *使用配置文件“jaxws.properties”。该文件采用标准java语言。util。属性格式,通常位于Java安装的conf目录中。它包含带有javax键的实现类的完全限定名。xml。ws。spi。供应商。
    *如果是名为javax的系统属性。xml。ws。spi。如果定义了Provideris,则其值将用作实现类的名称。
    *最后,使用平台默认实现。

代码示例

代码示例来源:origin: apache/cxf

private boolean isCXF() {
  return Provider.provider().getClass().getName().contains(".cxf");
}
public void unregister(Endpoint endpoint, Object service) throws EndpointRegistrationException {

代码示例来源:origin: org.apache.openejb/javaee-api

/**
 * @since 2.2
 */
public static Endpoint create(Object implementor, WebServiceFeature ... features) {
  return Provider.provider().createEndpoint(null, implementor, features);                
}
/**

代码示例来源:origin: org.apache.openejb/javaee-api

/**
 * @since 2.2
 */
public static Endpoint create(String bindingId, Object implementor, WebServiceFeature ... features) {
  return Provider.provider().createEndpoint(bindingId, implementor, features);        
}

代码示例来源:origin: org.apache.axis2/axis2-jaxws-api

public W3CEndpointReference build() {
  return Provider.provider().createW3CEndpointReference(address,
      serviceName,
      endpointName,
      metadataElements,
      wsdlDocumentLocation,
      referenceParameters);
}

代码示例来源:origin: javax/javaee-endorsed-api

protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) {
  delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
      serviceName,
      this.getClass(), features);
}

代码示例来源:origin: org.jboss.spec.javax.xml.ws/jboss-jaxws-api_2.2_spec

protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {
  delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
      serviceName,
      this.getClass());
}

代码示例来源:origin: javax/javaee-endorsed-api

protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {
  delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
      serviceName,
      this.getClass());
}

代码示例来源:origin: org.apache.openejb/javaee-api

/**
 * @since 2.2
 */
protected Service(URL wsdlDocumentLocation, QName serviceName, WebServiceFeature... features) {
  delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, getClass(), features);
}

代码示例来源:origin: org.jboss.spec.javax.xml.ws/jboss-jaxws-api_2.2_spec

protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) {
  delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
      serviceName,
      this.getClass(), features);
}

代码示例来源:origin: javax.xml.ws/com.springsource.javax.xml.ws

protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {
  delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
      serviceName,
      this.getClass());
}

代码示例来源:origin: org.apache.openejb/javaee-api

protected Service(URL wsdlDocumentLocation, QName serviceName) {
  delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, getClass());
}
/**

代码示例来源:origin: org.apache.openejb/javaee-api

public static Endpoint publish(String address, Object implementor) {
  return Provider.provider().createAndPublishEndpoint(address, implementor);
}
/**

代码示例来源:origin: org.apache.openejb/javaee-api

public static Endpoint create(String bindingId, Object implementor) {
  return Provider.provider().createEndpoint(bindingId, implementor);
}
/**

代码示例来源:origin: org.apache.openejb/javaee-api

public static EndpointReference readFrom(Source eprInfoset) {
  return Provider.provider().readEndpointReference(eprInfoset);
}

代码示例来源:origin: org.apache.axis2/axis2-jaxws-api

public static Endpoint create(String bindingId, Object implementor) {
  return Provider.provider().createEndpoint(bindingId, implementor);
}

代码示例来源:origin: org.apache.axis2/axis2-jaxws-api

public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features) {
  return Provider.provider().getPort(this, serviceEndpointInterface, features);
}

代码示例来源:origin: org.apache.axis2/axis2-jaxws-api

public static EndpointReference readFrom(Source eprInfoset) {
  return Provider.provider().readEndpointReference(eprInfoset);
}

代码示例来源:origin: apache/cxf

private static synchronized void createInstance() {
  if (instance != null) {
    return;
  }
  Provider p = Provider.provider();
  if (p.getClass().getName().contains("apache.cxf")) {
    instance = new CXFWSNHelper();
  } else {
    instance = new WSNHelper();
  }
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-server-bindings

private Endpoint publish(String address, Object implementor) {
    Provider provider = Provider.provider();
    if (provider.getClass().getName().startsWith("weblogic.")) {
      // workaround for WebLogic
      address = address + "/";
    }

    Endpoint endpoint = Endpoint.publish(address, implementor);
    SOAPBinding binding = (SOAPBinding) endpoint.getBinding();
    binding.setMTOMEnabled(true);

    return endpoint;
  }
}

代码示例来源:origin: org.jboss.ws.cxf/jbossws-cxf-server

@Override
public void start(final Deployment dep)
{
 if (BusFactory.getDefaultBus(false) == null)
 {
   //Make sure the default bus is created and set for client side usage
   //(i.e. no server side integration contribution in it)
   JBossWSBusFactory.getDefaultBus(Provider.provider().getClass().getClassLoader());
 }
 startDeploymentBus(dep);
}

相关文章