JAX-WS
v2.1

javax.xml.ws.spi
Class Provider

java.lang.Object
  extended by javax.xml.ws.spi.Provider

public abstract class Provider
extends java.lang.Object

Service provider for ServiceDelegate and Endpoint objects.

Since:
JAX-WS 2.0

Field Summary
static java.lang.String JAXWSPROVIDER_PROPERTY
          A constant representing the property used to lookup the name of a Provider implementation class.
 
Constructor Summary
protected Provider()
          Creates a new instance of Provider
 
Method Summary
abstract  Endpoint createAndPublishEndpoint(java.lang.String address, java.lang.Object implementor)
          Creates and publishes an endpoint object with the specified address and implementation object.
abstract  Endpoint createEndpoint(java.lang.String bindingId, java.lang.Object implementor)
          Creates an endpoint object with the provided binding and implementation object.
abstract  Endpoint createEndpoint(java.lang.String bindingId, java.lang.String[] features, java.lang.Object implementor)
          Creates an endpoint object with the provided binding, features and implementation object.
abstract  ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation, javax.xml.namespace.QName serviceName, java.lang.Class serviceClass)
          Creates a service delegate object.
abstract
<T> T
getPort(EndpointReference endpointReference, java.lang.Class<T> serviceEndpointInterface, WebServiceFeature... features)
          The getPort method returns a stub/proxy.
static Provider provider()
          Creates a new provider object.
abstract  EndpointReference readEndpointReference(javax.xml.transform.Source eprInfoset)
          read an EndpointReference from the infoset contained in eprInfoset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAXWSPROVIDER_PROPERTY

public static final java.lang.String JAXWSPROVIDER_PROPERTY
A constant representing the property used to lookup the name of a Provider implementation class.

See Also:
Constant Field Values
Constructor Detail

Provider

protected Provider()
Creates a new instance of Provider

Method Detail

provider

public static Provider provider()
Creates a new provider object.

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


createServiceDelegate

public abstract ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation,
                                                      javax.xml.namespace.QName serviceName,
                                                      java.lang.Class serviceClass)
Creates a service delegate object.

Parameters:
wsdlDocumentLocation - A URL pointing to the WSDL document for the service, or null if there isn't one.
serviceName - The qualified name of the service.
serviceClass - The service class, which must be either javax.xml.ws.Service or a subclass thereof.
Returns:
The newly created service delegate.

createEndpoint

public abstract Endpoint createEndpoint(java.lang.String bindingId,
                                        java.lang.Object implementor)
Creates an endpoint object with the provided binding and implementation object.

Parameters:
bindingId - A URI specifying the desired binding (e.g. SOAP/HTTP)
implementor - A service implementation object to which incoming requests will be dispatched. The corresponding class must be annotated with all the necessary Web service annotations.
Returns:
The newly created endpoint.

createEndpoint

public abstract Endpoint createEndpoint(java.lang.String bindingId,
                                        java.lang.String[] features,
                                        java.lang.Object implementor)
Creates an endpoint object with the provided binding, features and implementation object.

Parameters:
bindingId - A URI specifying the desired binding (e.g. SOAP/HTTP)
featuures - An array of Features to enable for the specified binding
implementor - A service implementation object to which incoming requests will be dispatched. The corresponding class must be annotated with all the necessary Web service annotations.
Returns:
The newly created endpoint.
Throws:
WebServiceException - If any feature is unsupported or incompatible with the specified bindingId
Since:
JAX-WS 2.1

createAndPublishEndpoint

public abstract Endpoint createAndPublishEndpoint(java.lang.String address,
                                                  java.lang.Object implementor)
Creates and publishes an endpoint object with the specified address and implementation object.

Parameters:
address - A URI specifying the address and transport/protocol to use. A http: URI must result in the SOAP 1.1/HTTP binding being used. Implementations may support other URI schemes.
implementor - A service implementation object to which incoming requests will be dispatched. The corresponding class must be annotated with all the necessary Web service annotations.
Returns:
The newly created endpoint.

readEndpointReference

public abstract EndpointReference readEndpointReference(javax.xml.transform.Source eprInfoset)
read an EndpointReference from the infoset contained in eprInfoset.

Throws:
WebServiceException - If there is an error creating the EndpointReference from the specified eprInfoset.
java.lang.NullPointerException - If the null eprInfoset value is given.
Since:
JAX-WS 2.1

getPort

public abstract <T> T getPort(EndpointReference endpointReference,
                              java.lang.Class<T> serviceEndpointInterface,
                              WebServiceFeature... features)
The getPort method returns a stub/proxy. If there are any reference parameters in the endpointReference, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned proxy. The parameter endpointReference specifies the endpoint that will be invoked by the returned stub. In the implementation of this method, the JAX-WS runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the proxy accordingly from the WSDL Metadata from the EndpointReference.

Parameters:
endpointReference - the EndpointReference that will be invoked by the returned proxy.
serviceEndpointInterface - Service endpoint interface
features - A list of WebServiceFeatures to configure on the proxy. Supported features not in the features parameter will have their default values.
Returns:
Object Proxy instance that supports the specified service endpoint interface
Throws:
WebServiceException -
  • If there is an error during creation of the proxy
  • If there is any missing WSDL metadata as required by this method
  • Optionally, if this endpointReference is illegal
  • Optionally, if an illegal serviceEndpointInterface is specified
  • If feature is enabled that is not compatible with this port or is unsupported.
Since:
JAX-WS 2.1
See Also:
WebServiceFeature

JAX-WS
v2.1


Comments to: jsr224-spec-comments@sun.com
More information at: http://java.sun.com/xml/jax-ws

Copyright © 2006 by Sun Microsystems, Inc., 4150 Network Circle,
Santa Clara, California 95054, U.S.A. All Rights Reserved.