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

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

We can develop an HTTP accessible Java API for XML-based remote procedure call (JAX-RPC) web service when we already have a JavaBeans object to enable as a web service.

Run the Java2WSDL command to create a WSDL file. When you run the Java2WSDL command, use the -bindingsTypes option, along with http, to set the HTTP transport bindings. For example:

To learn more about using the Java2WSDL command, see the Java2WSDL command for JAX-RPC applications documentation.

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 Java API for XML-based remote procedure call (JAX-RPC) specifications.

HTTP is the most commonly used transport for web services.

To develop an HTTP-accessible web service from an existing an existing JavaBeans object:

  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, to be accessible on the HTTP transport. An HTTP binding is a wsdl:binding element containing a wsdlsoap: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 wsdlsoap:address element with a location attribute that specifies an HTTP endpoint URL string.

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

  2. Add the HTTP endpoints to your EAR file using the endptEnabler command, if the application includes enterprise beans.

    By default, the endptEnabler command adds only HTTP endpoints.

  3. Deploy the web services application.

  4. Configure security for the HTTP connection.

    For a secure HTTP connection, add the basicAuth assembly property to the ibm-webservicesclient-bnd.xmi deployment descriptor file. Set the user ID and the password attributes.

  5. Configure the endpoint URL information for HTTP bindings.

    The WSDL publisher uses this partial URL string to produce the actual HTTP URL for each port component defined in the EAR file. The published WSDL file can be used by clients, that need to invoke the web service.


Results

You have a JavaBeans object that uses HTTP to transport Web services client requests.

Publish the WSDL file.


Subtopics


Related concepts:

Development and assembly tools
Web services transactions, high availability, firewalls and intermediary nodes


Reference:

Java2WSDL command for JAX-RPC applications


+

Search Tips   |   Advanced Search