Class Service

java.lang.Object
jakarta.xml.ws.Service

public class Service extends Object
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 Dispatch for dynamic 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:
1.6, JAX-WS 2.0
See Also: