Package javax.xml.ws.spi.http
Provides HTTP SPI that is used for portable deployment of JAX-WS web services in containers(for e.g.
See: Description
Class | Description |
---|---|
HttpContext | HttpContext represents a mapping between the root URI path of a web service to a |
HttpExchange | This class encapsulates a HTTP request received and a response to be generated in one exchange. |
HttpHandler | A handler which is invoked to process HTTP requests. |
Package javax.xml.ws.spi.http Description
Provides HTTP SPI that is used for portable deployment of JAX-WS web services in containers(for e.g. servlet containers). This SPI is not for end developers but provides a way for the container developers to deploy JAX-WS services portably.
The portable deployment is done as below:
- Container creates
Endpoint
objects for an application. The necessary information to create Endpoint objects may be got from web service deployment descriptor files. - Container needs to create
HttpContext
objects for the deployment. For example, a HttpContext could be created using servlet configuration(for e.g url-pattern) for the web service in servlet container case. - Then publishes all the endpoints using
Endpoint.publish(HttpContext)
. During publish(), JAX-WS runtime registers aHttpHandler
callback to handle incoming requests orHttpExchange
objects. The HttpExchange object encapsulates a HTTP request and a response.
Container JAX-WS runtime --------- -------------- 1. Creates Invoker1, ... InvokerN 2. Provider.createEndpoint(...) --> 3. creates Endpoint1 configures Endpoint1 ... 4. Provider.createEndpoint(...) --> 5. creates EndpointN configures EndpointN 6. Creates ApplicationContext 7. creates HttpContext1, ... HttpContextN 8. Endpoint1.publish(HttpContext1) --> 9. creates HttpHandler1 HttpContext1.setHandler(HttpHandler1) ... 10. EndpointN.publish(HttpContextN) --> 11. creates HttpHandlerN HttpContextN.setHandler(HttpHandlerN)The request processing is done as below(for every request):
Container JAX-WS runtime --------- -------------- 1. Creates a HttpExchange 2. Gets handler from HttpContext 3. HttpHandler.handle(HttpExchange) --> 4. reads request from HttpExchange The portable undeployment is done as below: Container --------- 1. @preDestroy on instances 2. Endpoint1.stop() ... 3. EndpointN.stop()
- Since:
- JAX-WS 2.2
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/javase/8/docs/api/javax/xml/ws/spi/http/package-summary.html