The Spring Framework

org.springframework.remoting.jaxws
Class SimpleJaxWsServiceExporter

java.lang.Object
  extended by org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter
All Implemented Interfaces:
BeanFactoryAware, DisposableBean

public class SimpleJaxWsServiceExporter
extends Object
implements BeanFactoryAware, DisposableBean

Simple exporter for JAX-WS services, autodetecting annotation service beans (through the JAX-WS WebService annotation) and exporting them with a configured base address (by default "http://localhost:8080/"). The full address for each service will consist of the base address with the service name appended (e.g. "http://localhost:8080/OrderService").

Note that this exporter will only work if the JAX-WS runtime actually supports publishing with an address argument, i.e. if the JAX-WS runtime ships an internal HTTP server. This is the case with the JAX-WS runtime that's inclued in Sun's JDK 1.6 but not with the standalone JAX-WS 2.1 RI.

Since:
2.5
Author:
Juergen Hoeller
See Also:
Endpoint.publish(String, Object)

Field Summary
static String DEFAULT_BASE_ADDRESS
           
 
Constructor Summary
SimpleJaxWsServiceExporter()
           
 
Method Summary
 void destroy()
          Stops all published endpoints, taking the web services offline.
 void setBaseAddress(String baseAddress)
          Set the base address for exported services.
 void setBeanFactory(BeanFactory beanFactory)
          Obtains all web service beans and publishes them as JAX-WS endpoints.
 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 setTaskExecutor(TaskExecutor executor)
          Set the Spring TaskExecutor to use for dispatching incoming requests to exported service instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BASE_ADDRESS

public static final String DEFAULT_BASE_ADDRESS
See Also:
Constant Field Values
Constructor Detail

SimpleJaxWsServiceExporter

public SimpleJaxWsServiceExporter()
Method Detail

setBaseAddress

public void setBaseAddress(String baseAddress)
Set the base address for exported services. Default is "http://localhost:8080/".

For each actual publication address, the service name will be appended to this base address. E.g. service name "OrderService" -> "http://localhost:8080/OrderService".

See Also:
Endpoint.publish(String), WebService.serviceName()

setExecutor

public void setExecutor(Executor executor)
Set the JDK concurrent executor to use for dispatching incoming requests to exported service instances.

See Also:
Endpoint.setExecutor(java.util.concurrent.Executor)

setTaskExecutor

public void setTaskExecutor(TaskExecutor executor)
Set the Spring TaskExecutor to use for dispatching incoming requests to exported service instances.

See Also:
Endpoint.setExecutor(java.util.concurrent.Executor)

setEndpointProperties

public 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"

See Also:
Endpoint.setProperties(java.util.Map), Endpoint.WSDL_SERVICE, Endpoint.WSDL_PORT

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
Obtains all web service beans and publishes them as JAX-WS endpoints.

Specified by:
setBeanFactory in interface BeanFactoryAware
Parameters:
beanFactory - owning BeanFactory (never null). The bean can immediately call methods on the factory.
See Also:
BeanInitializationException

destroy

public void destroy()
Stops all published endpoints, taking the web services offline.

Specified by:
destroy in interface DisposableBean

The Spring Framework

Copyright © 2002-2008 The Spring Framework.