Java™ API for XML-Based Web Services
(JAX-WS) includes an asynchronous response servlet, which is used
within the application server environment to receive responses for
JAX-WS requests that are invoked asynchronously.
Before you begin
JAX-WS provides support for invoking Web services using
an asynchronous client invocation by using either a callback or polling
model. Both the callback model and the polling model are available
on the Dispatch client and the dynamic proxy client. When a JAX-WS
client that is running within the application server environment uses
an asynchronous client invocation, the responses are received by the
asynchronous response servlet. To learn how to use the asynchronous
client invocation model, read about invoking JAX-WS Web services asynchronously.
About this task
The asynchronous response servlet is used within an application
server to handle incoming asynchronous responses. The servlet uses
the same secure and unsecure HTTP ports assigned to the application
server. The servlet starts automatically when the application server
starts. Because the asynchronous response servlet does not perform
role-based authorization checks, only user authentication checks are
performed.
The asynchronous response servlet supports both
the HTTP and HTTPS protocols. Since the servlet inherits the SSL configuration
of the application server, configuring the application server also
configures the servlet. The asynchronous response servlet is not affected
by the custom HTTP and SSL port properties used by the asynchronous
response listener and only runs on the application ports for the application
server.
Procedure
- Determine if you want the JAX-WS client to use the HTTP
or HTTPS transport mechanism.
- Configure the Web container transport chains to modify
the SSL configuration of the application server. The
servlet inherits these settings. Read about configuring transport
chains to learn how to configure the Web container transport chains.
Results
The asynchronous response servlet is configured to enable
your JAX-WS clients to receive asynchronous responses on the HTTP
or HTTPS transport protocol.
Avoid trouble: When you add a new application server to your environment,
the asynchronous response servlet is automatically restarted so the
deployment.xml file can be updated for the new application server.
If your application receives an incoming response when the asynchronous
response servlet is restarting, the incoming response might fail with
an HTTP 404 error.
gotcha
Avoid trouble: ![[oct2010]](../../delta.gif)
JAX-WS services need an HTTP Transport
policy set binding attached when returning asynchronous responses
to clients installed on application security-enabled servers JAX-WS
services do not successfully return asynchronous responses to clients
that are installed in application security-enabled WebSphere
® Application Servers. Because
the Asynchronous Response Servlet for WebSphere Application Server, which handles
asynchronous web services responses, is protected when application
security is enabled, you must supply a credential with the JAX-WS
service incoming response. Attach the HTTPTransport policy set binding
to the JAX-WS service in the service attachment. Additionally, enter
a valid basic authentication user ID and password, which are defined
in the user registry of the client, into the Basic authentication
for outbound asynchronous service responses field.
![[oct2010]](../../deltaend.gif)
oct2010
gotcha