WAS v8.5 > End-to-end paths > Web services - Transports

Use HTTP to transport web services requests for JAX-WS applications

We can develop an HTTP accessible JAX-WS web service when we have an existing JavaBeans object to enable as a web service.

You must have an annotated JAX-WS JavaBeans object to enable as a web service. Optionally, we can run the wsgen command to create a WSDL file from your annotated JAX-WS JavaBeans component. Specify the -wsdl option with the wsgen command to create the WSDL file.

For example:


The wsimport, wsgen, schemagen and xjc command-line tools are not supported on the z/OS platform. This functionality is provided by the assembly tools provided with WebSphere Application Server running on the z/OS platform. Read about these command-line tools for JAX-WS applications to learn more about these tools.

To learn about developing a JAX-WS web service using annotations, read about developing Java artifacts for JAX-WS applications using JavaBeans.

The application server supports the use of HTTP to transport web services client requests. With HTTP, the web services clients and servers can communicate through SOAP messages. SOAP is the underlying communication protocol used in web services that support the Web Services for Java EE and the JAX-WS specifications.

HTTP is the most commonly used transport for web services.

  1. Add an HTTP binding and a SOAP address to the WSDL file.

    The WSDL file of a web service must include an HTTP binding and a SOAP address, which specifies an HTTP endpoint URL string, that is accessible on the HTTP transport. An HTTP binding is a wsdl:binding element containing a soap:binding element with a transport attribute that ends in soap/http.

    In addition to the HTTP binding, a wsdl:port element that references the HTTP binding must be included in the wsdl:service element within the WSDL file. The wsdl:port element contains a soap:address element with a location attribute that specifies an HTTP endpoint URL string.

    When you develop the web service, we can use a placeholder such as file:unspecified_location for the endpoint URL string.

    If you deploy a JAX-WS JavaBeans component as a web service without a WSDL file, a WSDL file is automatically generated for the component.

  2. For JAX-WS web services applications, no HTTP transport configuration is needed. The HTTP transport settings are generated dynamically by the application server. The web application archive {WAR) file only needs the JavaBeans object along with the optional WSDL file properly installed.

  3. Deploy the web services application.

  4. Configure security for the HTTP transport.

  5. Optional. Configure HTTP session management.

  6. Optional. Configure the asynchronous response listener for JAX-WS clients.

  7. Configure the endpoint URL information for HTTP bindings.


Results

You have a JavaBeans object that uses HTTP to transport JAX-WS web services client requests.

Publish the WSDL file.


Subtopics


Related concepts:

Web services transactions, high availability, firewalls and intermediary nodes


Related


Use HTTP to transport web services
Use the JAX-WS asynchronous response servlet
Use the JAX-WS asynchronous response listener
Use HTTP session management support for JAX-WS applications
Configure the HTTP transport policy
Configure the SSL transport policy
Develop JAX-WS web services with annotations
Generate Java artifacts for JAX-WS applications


Reference:

wsgen command for JAX-WS applications


+

Search Tips   |   Advanced Search