public abstract class AbstractJaxWsServiceExporter extends Object implements BeanFactoryAware, InitializingBean, DisposableBean
WebService
annotation). Compatible with
JAX-WS 2.1 and 2.2, as included in JDK 6 update 4+ and Java 7/8.
Subclasses need to implement the publishEndpoint(javax.xml.ws.Endpoint, javax.jws.WebService)
template methods
for actual endpoint exposure.
WebService
,
Endpoint
,
SimpleJaxWsServiceExporter
,
SimpleHttpServerJaxWsServiceExporter
Constructor and Description |
---|
AbstractJaxWsServiceExporter() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Immediately publish all endpoints when fully configured.
|
protected Endpoint |
createEndpoint(Object bean)
Create the actual Endpoint instance.
|
void |
destroy()
Stops all published endpoints, taking the web services offline.
|
protected abstract void |
publishEndpoint(Endpoint endpoint,
WebService annotation)
Actually publish the given endpoint.
|
protected abstract void |
publishEndpoint(Endpoint endpoint,
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(String bindingType)
Specify the binding type to use, overriding the value of
the JAX-WS
BindingType annotation. |
void |
setEndpointFeatures(WebServiceFeature... endpointFeatures)
Specify WebServiceFeature objects (e.g.
|
void |
setEndpointProperties(Map<String,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(Executor executor)
Set the JDK concurrent executor to use for dispatching incoming requests
to exported service instances.
|
void |
setWebServiceFeatures(Object[] webServiceFeatures)
Deprecated.
as of Spring 4.0, in favor of
setEndpointFeatures(javax.xml.ws.WebServiceFeature...) |
public void setEndpointProperties(Map<String,Object> endpointProperties)
public void setExecutor(Executor executor)
public void setBindingType(String bindingType)
BindingType
annotation.public void setEndpointFeatures(WebServiceFeature... endpointFeatures)
@Deprecated public void setWebServiceFeatures(Object[] webServiceFeatures)
setEndpointFeatures(javax.xml.ws.WebServiceFeature...)
WebServiceFeature
objects,
WebServiceFeature Class references, or WebServiceFeature class names.
As of Spring 4.0, this is effectively just an alternative way of
specifying "endpointFeatures"
. Do not specify
both properties at the same time; prefer "endpointFeatures" moving forward.
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
beanFactory
- owning BeanFactory (never null
).
The bean can immediately call methods on the factory.BeanInitializationException
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
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.@UsesJava7 protected Endpoint createEndpoint(Object bean)
bean
- the service object to wrapEndpoint.create(Object)
,
Endpoint.create(String, Object)
protected abstract void publishEndpoint(Endpoint endpoint, WebService annotation)
endpoint
- the JAX-WS Endpoint objectannotation
- the service bean's WebService annotationprotected abstract void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation)
endpoint
- the JAX-WS Provider Endpoint objectannotation
- the service bean's WebServiceProvider annotationpublic void destroy()
destroy
in interface DisposableBean