com.sun.xml.ws.server
Class EndpointFactory

java.lang.Object
  extended by com.sun.xml.ws.server.EndpointFactory

public class EndpointFactory
extends java.lang.Object

Entry point to the JAX-WS RI server-side runtime.


Constructor Summary
EndpointFactory()
           
 
Method Summary
<T> WSEndpoint<T>
create(java.lang.Class<T> implType, boolean processHandlerAnnotation, Invoker invoker, javax.xml.namespace.QName serviceName, javax.xml.namespace.QName portName, Container container, WSBinding binding, SDDocumentSource primaryWsdl, java.util.Collection<? extends SDDocumentSource> metadata, org.xml.sax.EntityResolver resolver, boolean isTransportSynchronous)
          Implements WSEndpoint.create(java.lang.Class, boolean, com.sun.xml.ws.api.server.Invoker, javax.xml.namespace.QName, javax.xml.namespace.QName, com.sun.xml.ws.api.server.Container, com.sun.xml.ws.api.WSBinding, com.sun.xml.ws.api.server.SDDocumentSource, java.util.Collection, org.xml.sax.EntityResolver, boolean).
<T> WSEndpoint<T>
create(java.lang.Class<T> implType, boolean processHandlerAnnotation, Invoker invoker, javax.xml.namespace.QName serviceName, javax.xml.namespace.QName portName, Container container, WSBinding binding, SDDocumentSource primaryWsdl, java.util.Collection<? extends SDDocumentSource> metadata, org.xml.sax.EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard)
           
protected
<T> WSEndpoint<T>
create(javax.xml.namespace.QName serviceName, javax.xml.namespace.QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort wsdlPort, java.lang.Class<T> implType, ServiceDefinitionImpl serviceDefinition, EndpointAwareTube terminal, boolean isTransportSynchronous, com.sun.xml.ws.policy.PolicyMap policyMap)
           
static
<T> WSEndpoint<T>
createEndpoint(java.lang.Class<T> implType, boolean processHandlerAnnotation, Invoker invoker, javax.xml.namespace.QName serviceName, javax.xml.namespace.QName portName, Container container, WSBinding binding, SDDocumentSource primaryWsdl, java.util.Collection<? extends SDDocumentSource> metadata, org.xml.sax.EntityResolver resolver, boolean isTransportSynchronous)
          Implements WSEndpoint.create(java.lang.Class, boolean, com.sun.xml.ws.api.server.Invoker, javax.xml.namespace.QName, javax.xml.namespace.QName, com.sun.xml.ws.api.server.Container, com.sun.xml.ws.api.WSBinding, com.sun.xml.ws.api.server.SDDocumentSource, java.util.Collection, org.xml.sax.EntityResolver, boolean).
static
<T> WSEndpoint<T>
createEndpoint(java.lang.Class<T> implType, boolean processHandlerAnnotation, Invoker invoker, javax.xml.namespace.QName serviceName, javax.xml.namespace.QName portName, Container container, WSBinding binding, SDDocumentSource primaryWsdl, java.util.Collection<? extends SDDocumentSource> metadata, org.xml.sax.EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard)
           
protected
<T> EndpointAwareTube
createProviderInvokerTube(java.lang.Class<T> implType, WSBinding binding, Invoker invoker, Container container)
           
protected  EndpointAwareTube createSEIInvokerTube(AbstractSEIModelImpl seiModel, Invoker invoker, WSBinding binding)
           
static javax.xml.namespace.QName getDefaultPortName(javax.xml.namespace.QName serviceName, java.lang.Class<?> implType)
          If portName is not already set via DD or programmatically, it uses annotations on implementorClass to get PortName.
static javax.xml.namespace.QName getDefaultPortName(javax.xml.namespace.QName serviceName, java.lang.Class<?> implType, boolean isStandard)
           
static javax.xml.namespace.QName getDefaultPortName(javax.xml.namespace.QName serviceName, java.lang.Class<?> implType, boolean isStandard, MetadataReader metadataReader)
           
static javax.xml.namespace.QName getDefaultPortName(javax.xml.namespace.QName serviceName, java.lang.Class<?> implType, MetadataReader metadataReader)
           
static javax.xml.namespace.QName getDefaultServiceName(java.lang.Class<?> implType)
          If service name is not already set via DD or programmatically, it uses annotations WebServiceProvider, WebService on implementorClass to get PortName.
static javax.xml.namespace.QName getDefaultServiceName(java.lang.Class<?> implType, boolean isStandard)
           
static javax.xml.namespace.QName getDefaultServiceName(java.lang.Class<?> implType, boolean isStandard, MetadataReader metadataReader)
           
static javax.xml.namespace.QName getDefaultServiceName(java.lang.Class<?> implType, MetadataReader metadataReader)
           
static MetadataReader getExternalMetadatReader(java.lang.Class<?> implType, WSBinding binding)
           
static EndpointFactory getInstance()
           
static java.lang.String getWsdlLocation(java.lang.Class<?> implType)
          Returns the wsdl from @WebService, or @WebServiceProvider annotation using wsdlLocation element.
static java.lang.String getWsdlLocation(java.lang.Class<?> implType, MetadataReader metadataReader)
          Returns the wsdl from @WebService, or @WebServiceProvider annotation using wsdlLocation element.
protected  boolean isUseProviderTube(java.lang.Class<?> implType, boolean isStandard)
           
static boolean verifyImplementorClass(java.lang.Class<?> clz)
          Verifies if the endpoint implementor class has @WebService or @WebServiceProvider annotation
static boolean verifyImplementorClass(java.lang.Class<?> clz, MetadataReader metadataReader)
          Verifies if the endpoint implementor class has @WebService or @WebServiceProvider annotation; passing MetadataReader instance allows to read annotations from xml descriptor instead of class's annotations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointFactory

public EndpointFactory()
Method Detail

getInstance

public static EndpointFactory getInstance()

createEndpoint

public static <T> WSEndpoint<T> createEndpoint(java.lang.Class<T> implType,
                                               boolean processHandlerAnnotation,
                                               @Nullable
                                               Invoker invoker,
                                               @Nullable
                                               javax.xml.namespace.QName serviceName,
                                               @Nullable
                                               javax.xml.namespace.QName portName,
                                               @Nullable
                                               Container container,
                                               @Nullable
                                               WSBinding binding,
                                               @Nullable
                                               SDDocumentSource primaryWsdl,
                                               @Nullable
                                               java.util.Collection<? extends SDDocumentSource> metadata,
                                               org.xml.sax.EntityResolver resolver,
                                               boolean isTransportSynchronous)
Implements WSEndpoint.create(java.lang.Class, boolean, com.sun.xml.ws.api.server.Invoker, javax.xml.namespace.QName, javax.xml.namespace.QName, com.sun.xml.ws.api.server.Container, com.sun.xml.ws.api.WSBinding, com.sun.xml.ws.api.server.SDDocumentSource, java.util.Collection, org.xml.sax.EntityResolver, boolean). No need to take WebServiceContext implementation. When InvokerPipe is instantiated, it calls InstanceResolver to set up a WebServiceContext. We shall only take delegate to getUserPrincipal and isUserInRole from adapter.

Nobody else should be calling this method.


createEndpoint

public static <T> WSEndpoint<T> createEndpoint(java.lang.Class<T> implType,
                                               boolean processHandlerAnnotation,
                                               @Nullable
                                               Invoker invoker,
                                               @Nullable
                                               javax.xml.namespace.QName serviceName,
                                               @Nullable
                                               javax.xml.namespace.QName portName,
                                               @Nullable
                                               Container container,
                                               @Nullable
                                               WSBinding binding,
                                               @Nullable
                                               SDDocumentSource primaryWsdl,
                                               @Nullable
                                               java.util.Collection<? extends SDDocumentSource> metadata,
                                               org.xml.sax.EntityResolver resolver,
                                               boolean isTransportSynchronous,
                                               boolean isStandard)

create

public <T> WSEndpoint<T> create(java.lang.Class<T> implType,
                                boolean processHandlerAnnotation,
                                @Nullable
                                Invoker invoker,
                                @Nullable
                                javax.xml.namespace.QName serviceName,
                                @Nullable
                                javax.xml.namespace.QName portName,
                                @Nullable
                                Container container,
                                @Nullable
                                WSBinding binding,
                                @Nullable
                                SDDocumentSource primaryWsdl,
                                @Nullable
                                java.util.Collection<? extends SDDocumentSource> metadata,
                                org.xml.sax.EntityResolver resolver,
                                boolean isTransportSynchronous)
Implements WSEndpoint.create(java.lang.Class, boolean, com.sun.xml.ws.api.server.Invoker, javax.xml.namespace.QName, javax.xml.namespace.QName, com.sun.xml.ws.api.server.Container, com.sun.xml.ws.api.WSBinding, com.sun.xml.ws.api.server.SDDocumentSource, java.util.Collection, org.xml.sax.EntityResolver, boolean). No need to take WebServiceContext implementation. When InvokerPipe is instantiated, it calls InstanceResolver to set up a WebServiceContext. We shall only take delegate to getUserPrincipal and isUserInRole from adapter.

Nobody else should be calling this method.


create

public <T> WSEndpoint<T> create(java.lang.Class<T> implType,
                                boolean processHandlerAnnotation,
                                @Nullable
                                Invoker invoker,
                                @Nullable
                                javax.xml.namespace.QName serviceName,
                                @Nullable
                                javax.xml.namespace.QName portName,
                                @Nullable
                                Container container,
                                @Nullable
                                WSBinding binding,
                                @Nullable
                                SDDocumentSource primaryWsdl,
                                @Nullable
                                java.util.Collection<? extends SDDocumentSource> metadata,
                                org.xml.sax.EntityResolver resolver,
                                boolean isTransportSynchronous,
                                boolean isStandard)

create

protected <T> WSEndpoint<T> create(javax.xml.namespace.QName serviceName,
                                   javax.xml.namespace.QName portName,
                                   WSBinding binding,
                                   Container container,
                                   SEIModel seiModel,
                                   WSDLPort wsdlPort,
                                   java.lang.Class<T> implType,
                                   ServiceDefinitionImpl serviceDefinition,
                                   EndpointAwareTube terminal,
                                   boolean isTransportSynchronous,
                                   com.sun.xml.ws.policy.PolicyMap policyMap)

isUseProviderTube

protected boolean isUseProviderTube(java.lang.Class<?> implType,
                                    boolean isStandard)

createSEIInvokerTube

protected EndpointAwareTube createSEIInvokerTube(AbstractSEIModelImpl seiModel,
                                                 Invoker invoker,
                                                 WSBinding binding)

createProviderInvokerTube

protected <T> EndpointAwareTube createProviderInvokerTube(java.lang.Class<T> implType,
                                                          WSBinding binding,
                                                          Invoker invoker,
                                                          Container container)

verifyImplementorClass

public static boolean verifyImplementorClass(java.lang.Class<?> clz)
Verifies if the endpoint implementor class has @WebService or @WebServiceProvider annotation

Returns:
true if it is a Provider or AsyncProvider endpoint false otherwise
Throws:
java.lang.IllegalArgumentException - If it doesn't have any one of @WebService or @WebServiceProvider If it has both @WebService and @WebServiceProvider annotations

verifyImplementorClass

public static boolean verifyImplementorClass(java.lang.Class<?> clz,
                                             MetadataReader metadataReader)
Verifies if the endpoint implementor class has @WebService or @WebServiceProvider annotation; passing MetadataReader instance allows to read annotations from xml descriptor instead of class's annotations

Returns:
true if it is a Provider or AsyncProvider endpoint false otherwise
Throws:
java.lang.IllegalArgumentException - If it doesn't have any one of @WebService or @WebServiceProvider If it has both @WebService and @WebServiceProvider annotations

getExternalMetadatReader

public static MetadataReader getExternalMetadatReader(java.lang.Class<?> implType,
                                                      WSBinding binding)

getDefaultServiceName

@NotNull
public static javax.xml.namespace.QName getDefaultServiceName(java.lang.Class<?> implType)
If service name is not already set via DD or programmatically, it uses annotations WebServiceProvider, WebService on implementorClass to get PortName.

Returns:
non-null service name

getDefaultServiceName

@NotNull
public static javax.xml.namespace.QName getDefaultServiceName(java.lang.Class<?> implType,
                                                                      MetadataReader metadataReader)

getDefaultServiceName

@NotNull
public static javax.xml.namespace.QName getDefaultServiceName(java.lang.Class<?> implType,
                                                                      boolean isStandard)

getDefaultServiceName

@NotNull
public static javax.xml.namespace.QName getDefaultServiceName(java.lang.Class<?> implType,
                                                                      boolean isStandard,
                                                                      MetadataReader metadataReader)

getDefaultPortName

@NotNull
public static javax.xml.namespace.QName getDefaultPortName(javax.xml.namespace.QName serviceName,
                                                                   java.lang.Class<?> implType)
If portName is not already set via DD or programmatically, it uses annotations on implementorClass to get PortName.

Returns:
non-null port name

getDefaultPortName

@NotNull
public static javax.xml.namespace.QName getDefaultPortName(javax.xml.namespace.QName serviceName,
                                                                   java.lang.Class<?> implType,
                                                                   MetadataReader metadataReader)

getDefaultPortName

@NotNull
public static javax.xml.namespace.QName getDefaultPortName(javax.xml.namespace.QName serviceName,
                                                                   java.lang.Class<?> implType,
                                                                   boolean isStandard)

getDefaultPortName

@NotNull
public static javax.xml.namespace.QName getDefaultPortName(javax.xml.namespace.QName serviceName,
                                                                   java.lang.Class<?> implType,
                                                                   boolean isStandard,
                                                                   MetadataReader metadataReader)

getWsdlLocation

@Nullable
public static java.lang.String getWsdlLocation(java.lang.Class<?> implType)
Returns the wsdl from @WebService, or @WebServiceProvider annotation using wsdlLocation element.

Parameters:
implType - endpoint implementation class make sure that you called verifyImplementorClass(java.lang.Class) on it.
Returns:
wsdl if there is wsdlLocation, else null

getWsdlLocation

@Nullable
public static java.lang.String getWsdlLocation(java.lang.Class<?> implType,
                                                        MetadataReader metadataReader)
Returns the wsdl from @WebService, or @WebServiceProvider annotation using wsdlLocation element.

Parameters:
implType - endpoint implementation class make sure that you called verifyImplementorClass(java.lang.Class) on it.
Returns:
wsdl if there is wsdlLocation, else null


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.