Operating Systems: i5/OS
             Personalize the table of contents and search results

 

Task overview: Implementing Web services applications

 

This topic introduces you to using Web services. WebSphere Application Server supports Web services that are developed and implemented based on a variety of Java programming models. Use Web services when operating across a variety of platforms, including the J2EE 1.4 and non-J2EE platforms. Decide if a Web services implementation benefits your business process.

 

Overview

For a detailed list of the Web services specifications supported by the application server, read about specifications and API documentation.

Implementing Web services applications is an easy way to integrate application systems together within or outside your business infrastructure that function as stand-alone systems. For example, your customer information database is a stand-alone application, but you want your accounting application to access the customer data. You can create a Web service for the customer database and then enable the accounting application as a Web service client. The accounting application can now access the customer information. By implementing a Web service, these two applications can share information in an efficient way.

Because Web services are easily applied to existing applications and information technology assets, you can develop, deploy and recompose new solutions quickly to address new opportunities. As Web services become more popular, the pool of services grows, promoting development of more robust models of just-in-time application and business integration over the Internet. You can use Web services applications with the application server by following the steps provided:

 

Procedure

  1. Plan to use Web services. Review the Universal Description, Discovery, and Integration (UDDI) and Web services enablement of the service integration bus (SIBus) concepts to learn how these components can make your Web services plan more robust.

  2. (Optional) Migrate existing Web services.

    If you have used Web services based on Apache SOAP and now want to develop and implement Web services based on the Web Services for J2EE specification, you need to migrate client applications developed with all versions of 4.0, and versions of 5.0 prior to 5.0.2.

  3. Develop Web services applications. You can develop a Web service in one of five ways:

    1. Develop Web services using JavaBeans implementation.

      You can create a Web service by starting with an existing Java application. Transforming an existing application into Web services is called a bottoms-up approach to developing Web services. This process is called bottoms-up because you are starting with the implementation rather than starting with an existing service or Web Services Description Language (WSDL) file.

    2. Develop Web services using a stateless session enterprise bean.

      You can create a Web service by starting with an existing stateless session enterprise bean using a bottoms-up approach to developing Web services.

      Note: Enterprise JavaBeans are only supported in JAX-RPC applications.

    3. Develop Web services with an existing WSDL file using JavaBeans implementation.

      You can create a Web service by starting with an existing Web Services Description Language (WSDL) file describing the service interface for a Java application. Typically, the WSDL file is defined as part of the application modeling process. Using an existing service definition or WSDL file to generate a new application is called a top-down approach to developing Web services.

    4. Develop Web services with an existing WSDL file using a stateless session enterprise bean.

      You can create a Web service by starting with an existing WSDL file describing the service interface of an enterprise bean implementation using a top-down approach to developing Web services.

      Note: Enterprise JavaBeans are supported in JAX-RPC applications only.

    5. Enable Web services through service integration technologies You can use the Web services enablement of the service integration bus (SIBus) to achieve the following goals:

      • Make an internally hosted service that is available at a bus destination available as a Web service.

      • Make an external Web service available internally at a bus destination.

      • Use the Web services gateway to map an existing service, either an internally-hosted service or an external Web service, to a new Web service that is provided by the gateway.

    Web services can be developed to take advantage of Web Services Addressing (WS-Addressing), Web Services Resource Framework (WSRF) and WS-Notification support.

  4. Assemble Web services.

    Read about what you need to assemble a Web service and the order in which to assemble the parts, for example an enterprise archive (EAR) file.

  5. Deploy Web services.

    Read about the steps necessary to deploy the EAR file that has been configured and enabled for Web services.

  6. Administering deployed Web services.

    Read about administering deployed Web services applications.

  7. Publish the WSDL file.

    After installing a Web services application, and optionally modifying the endpoint information, you might need Web Services Description Language (WSDL) files containing the updated endpoint information. Read about the steps necessary to publish the WSDL files so that this information is available.

  8. Developing and deploying Web services clients.

    Read about developing and deploying Web services client based on the Web Services for J2EE specification.

  9. Secure Web services.

    For information about integrating message-level security into an application server, see:

  10. Monitoring the performance of Web services applications.

    Read about using the Performance Monitoring Infrastructure (PMI) to measure the time required to process Web services requests.

  11. Troubleshoot Web services.

    Read about troubleshooting different processes used to develop, implement and use Web services, including command-line tools, Java compiling errors, client runtime errors and exceptions, serialization and deserialization errors, and authentication challenges and authorization failures with Web services security.

 

Example

The following example illustrates how a business might use Web services.

The owner of a flower shop wants to start receiving orders from customers through the Web. This owner starts the process by finding wholesale flower suppliers, pricing the product, and completing contracts for future flower orders. Using Web services, the flower shop owner can find wholesale flower suppliers. One way to find new suppliers is to use a Universal Description, Discovery and Integration (UDDI) registry to search for potential suppliers. When the suppliers are chosen, the registry sends back information on how to contact the flower distributors that meet the criteria of the flower shop owner.

The flower shop owner can request price lists from each of the suppliers by obtaining a WSDL file for each potential supplier. The WSDL can be downloaded from the Web page of the supplier, received through e-mail, or retrieved from the UDDI registry entry of the supplier.

The WSDL describes the procedure call. When using WebSphere Application Server, the procedure call is a Java API for XML-based remote procedure call (JAX-RPC) which retrieves price lists. The WSDL file also specifies the Universal Resource Locator (URL) where the request is sent.

The flower shop owner now has to compare the prices received from each supplier, decide which suppliers to do business with, and make arrangements for future orders to fill. The flower shop can now sell merchandise through the Web by using Web services to communicate with suppliers for the best prices and complete the ordering processes. The merchandise price lists need publishing to the Web site and a mechanism is needed for customers to order flowers.

The Web services clients of the flower supplier are deployed on the flower shop server. When a customer makes a transaction to purchase flowers through the Web, the order is sent to the supplier through the procedure call. The supplier responds by sending a confirmation with the order number and shipping date. The suppliers maintain the inventory and the flower shop owner handles billing and customer order management.

Similarly, the flower shop catalog can be composed automatically from the catalogs of each supplier. If the supplier delivers directly to the customer, then the order tracking inquiries can pass directly to the order tracking system of the supplier. The supplier can also use Web services to send invoices for orders by the flower shop. Processes that previously required forms to fill manually, and fax or mail, can now be done automatically, saving labor costs for both the flower shop and the supplier.

Using Web services is beneficial because a much larger inventory is made available to the flower shop. No merchandise maintenance overhead exists, and the flower shop can offer their customers products that they otherwise might not have. Selling flowers through the Web increases capital for the flower shop without overhead of another store or resources invested into additional products.

For a more detailed scenario, see Web services scenario: Overview which tells the story of a fictional online garden supply retailer, Plants by WebSphere, and how they incorporated the Web services concept.


}
Service-oriented architecture

Web services

Planning to use Web services

Web services migration best practices

Migrating Apache SOAP Web services to Web Services for J2EE standards

Developing Web services applications from JavaBeans

Developing Web services applications from enterprise beans

Developing Web services applications from existing WSDL files with JavaBeans

Developing Web services applications from existing WSDL files with enterprise beans

Developing Applications that use Web Services Addressing

Creating stateful Web services using the Web Services Resource Framework

Using HTTP to transport Web services

Running an unmanaged Web services JAX-RPC client

Assembling Web services applications

Deploying Web services applications onto application servers

Administering deployed Web services applications

Making deployed Web services application available to clients

Developing and deploying Web services clients

Securing Web services applications at the transport level

Authenticating Web services clients using HTTP basic authentication

Testing Web services-enabled clients

Monitoring the performance of Web services applications

Tuning Web services security for V6.1 applications

Securing Web services for V5.x applications based on WS-Security

Securing Web services applications using JAX-RPC at the message level

Troubleshooting Web services

Web services: Resources for learning

WebSphere Application Server roles and goals

 

Related concepts


Web Services for J2EE specification
JAX-RPC
WSDL
SOAP
SOAP with Attachments API for Java interface
Web Services-Interoperability Basic Profile
RMI-IIOP using JAX-RPC
WS-I Attachments Profile
Overview: Online garden retailer Web services scenarios
Web services approach to a service-oriented architecture
Web services business models supported

 

Related tasks


Enabling Web services through service integration technologies
WS-Notification - publish and subscribe messaging for Web services

 

Related Reference


Web services SOAP/JMS protocol
Specifications and API documentation