public abstract class AbstractJaxWsServiceExporter extends java.lang.Object implements BeanFactoryAware, InitializingBean, DisposableBean
WebService annotation).
Subclasses need to implement the publishEndpoint(javax.xml.ws.Endpoint, javax.jws.WebService) template methods
for actual endpoint exposure.
WebService,
Endpoint,
SimpleJaxWsServiceExporter,
SimpleHttpServerJaxWsServiceExporter| Modifier and Type | Field and Description |
|---|---|
private ListableBeanFactory |
beanFactory |
private java.lang.String |
bindingType |
private javax.xml.ws.WebServiceFeature[] |
endpointFeatures |
private java.util.Map<java.lang.String,java.lang.Object> |
endpointProperties |
private java.util.concurrent.Executor |
executor |
private java.util.Set<javax.xml.ws.Endpoint> |
publishedEndpoints |
| Constructor and Description |
|---|
AbstractJaxWsServiceExporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Immediately publish all endpoints when fully configured.
|
protected javax.xml.ws.Endpoint |
createEndpoint(java.lang.Object bean)
Create the actual Endpoint instance.
|
void |
destroy()
Stops all published endpoints, taking the web services offline.
|
protected abstract void |
publishEndpoint(javax.xml.ws.Endpoint endpoint,
javax.jws.WebService annotation)
Actually publish the given endpoint.
|
protected abstract void |
publishEndpoint(javax.xml.ws.Endpoint endpoint,
javax.xml.ws.WebServiceProvider annotation)
Actually publish the given provider endpoint.
|
void |
publishEndpoints()
Publish all
WebService annotated beans in the
containing BeanFactory. |
void |
setBeanFactory(BeanFactory beanFactory)
Obtains all web service beans and publishes them as JAX-WS endpoints.
|
void |
setBindingType(java.lang.String bindingType)
Specify the binding type to use, overriding the value of
the JAX-WS
BindingType annotation. |
void |
setEndpointFeatures(javax.xml.ws.WebServiceFeature... endpointFeatures)
Specify WebServiceFeature objects (e.g.
|
void |
setEndpointProperties(java.util.Map<java.lang.String,java.lang.Object> endpointProperties)
Set the property bag for the endpoint, including properties such as
"javax.xml.ws.wsdl.service" or "javax.xml.ws.wsdl.port".
|
void |
setExecutor(java.util.concurrent.Executor executor)
Set the JDK concurrent executor to use for dispatching incoming requests
to exported service instances.
|
private java.util.Map<java.lang.String,java.lang.Object> endpointProperties
private java.util.concurrent.Executor executor
private java.lang.String bindingType
private javax.xml.ws.WebServiceFeature[] endpointFeatures
private ListableBeanFactory beanFactory
private final java.util.Set<javax.xml.ws.Endpoint> publishedEndpoints
public void setEndpointProperties(java.util.Map<java.lang.String,java.lang.Object> endpointProperties)
Endpoint.setProperties(java.util.Map<java.lang.String, java.lang.Object>),
Endpoint.WSDL_SERVICE,
Endpoint.WSDL_PORTpublic void setExecutor(java.util.concurrent.Executor executor)
Endpoint.setExecutor(java.util.concurrent.Executor)public void setBindingType(java.lang.String bindingType)
BindingType annotation.public void setEndpointFeatures(javax.xml.ws.WebServiceFeature... endpointFeatures)
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory in interface BeanFactoryAwarebeanFactory - owning BeanFactory (never null).
The bean can immediately call methods on the factory.BeanInitializationExceptionpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface InitializingBeanjava.lang.Exception - in the event of misconfiguration (such
as failure to set an essential property) or if initialization fails.publishEndpoints()public void publishEndpoints()
WebService annotated beans in the
containing BeanFactory.protected javax.xml.ws.Endpoint createEndpoint(java.lang.Object bean)
bean - the service object to wrapEndpoint.create(Object),
Endpoint.create(String, Object)protected abstract void publishEndpoint(javax.xml.ws.Endpoint endpoint,
javax.jws.WebService annotation)
endpoint - the JAX-WS Endpoint objectannotation - the service bean's WebService annotationprotected abstract void publishEndpoint(javax.xml.ws.Endpoint endpoint,
javax.xml.ws.WebServiceProvider annotation)
endpoint - the JAX-WS Provider Endpoint objectannotation - the service bean's WebServiceProvider annotationpublic void destroy()
destroy in interface DisposableBean