Service
objects provide the client view of a Web service.
Service
acts as a factory of the following:
- Proxies for a target service endpoint.
- Instances of {@link javax.xml.ws.Dispatch} fordynamic message-oriented invocation of a remote operation.
The ports available on a service can be enumerated using the getPorts
method. Alternatively, you can pass a service endpoint interface to the unary getPort
method and let the runtime select a compatible port.
Handler chains for all the objects created by a Service
can be set by means of a HandlerResolver
.
An Executor
may be set on the service in order to gain better control over the threads used to dispatch asynchronous callbacks. For instance, thread pooling with certain parameters can be enabled by creating a ThreadPoolExecutor
and registering it with the service.
@since JAX-WS 2.0
@see javax.xml.ws.spi.Provider
@see javax.xml.ws.handler.HandlerResolver
@see java.util.concurrent.Executor