+

Search Tips   |   Advanced Search

Implement web services applications

IBM WAS supports JAX-WS and JAX-RPC. JAX-WS supports annotations

Web services integrate application systems within or outside the business infrastructure. For example, a customer information database is a stand-alone application, but we want our accounting application to access the customer data. 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.


Tasks

  1. (Optional) Migrate existing web services.

    Most application servers that offer support for the newer JAX-WS and JAXB specifications continue to support the older JAX-RPC specification. Annotations, SOAP 1.2 and SOAP Message Transmission Optimization Mechanism (MTOM) support are only available within the JAX-WS 2.x and JAXB 2.x programming models and not JAX-RPC.

    Existing JAX-RPC applications wanting to use JAX-WS features must be rewritten using JAX-WS.

    If we have used web services based on Apache SOAP and now want to develop and implement Web Services for Java EE specification, we need to migrate client applications developed with all versions of 4.0, and versions of 5.0 before 5.0.2. To learn more, see the migrating Apache SOAP web services to JAX-RPC web services based on Java EE standards information.

  2. Develop web services applications. We can develop web services in one of the following ways:

    1. Develop web services from existing WSDL files using JAX-WS.
    2. Develop web services applications using JAX-WS.
    3. Develop and deploy JAX-WS web services clients.
    4. Develop Web services applications from existing WSDL files with JAX-RPC.
    5. Develop web services applications with JAX-RPC.
    6. Develop and deploy JAX-RPC web services clients
    7. Enable web services through service integration technologies

    We can develop web services to take advantage of...

  3. Assemble web services.
  4. Deploy Web services.
  5. Administer deployed web services.
  6. Secure web services.
  7. Manage policy sets .
  8. Review standards and programming models for web services message-level security.

  9. Publish the WSDL file.
  10. Monitor the performance of web services applications.
  11. Troubleshoot web services.


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 UDDI registry to search for potential suppliers. When the suppliers are chosen, the registry sends back information about 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 email, or retrieved from the UDDI registry entry of the supplier.

The WSDL describes the procedure call. When using the application server, the procedure call is a JAX-RPC or a JAX-WS procedure call. Either of these procedure call types retrieves the price list. 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 using web services to communicate with suppliers for the best prices and complete the ordering processes. The merchandise price lists need publishing to the website 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.

Use 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 the information for the 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.

Refer to the Samples section of the Information Center for additional Samples that demonstrate JAX-WS and JAX-RPC web services.


Related:

  • Service-oriented architecture
  • Web services
  • Web Services for Java EE specification
  • JAX-RPC
  • WSDL
  • JAX-WS
  • JAXB
  • SOAP
  • SOAP with Attachments API for Java interface
  • Message Transmission Optimization Mechanism
  • Overview: Online garden retailer web services scenarios
  • WS-I Basic Profile
  • RMI-IIOP using JAX-RPC
  • WS-I Attachments Profile
  • Overview of standards and programming models for web services message-level security
  • Web services approach to a service-oriented architecture
  • Web services business models supported in SOA
  • Planning to use web services
  • Migrate Apache SOAP web services to JAX-RPC web services based on Java EE standards
  • Implement web services applications with JAX-WS
  • Implement web services applications from existing WSDL files with JAX-WS
  • Implement static JAX-WS web services clients
  • Use JAXB for XML data binding
  • Use handlers in JAX-WS web services
  • Running an unmanaged web services JAX-WS client
  • Implement web services applications with JAX-RPC
  • Implement web services applications from existing WSDL files with JAX-RPC
  • Implement JAX-RPC web services clients
  • Running an unmanaged web services JAX-RPC client
  • Use HTTP to transport web services
  • Use SOAP over JMS to transport web services
  • Developing applications that use Web Services Addressing
  • Create stateful web services using the Web Services Resource Framework
  • Add assured delivery to web services through WS-ReliableMessaging
  • Use WS-Transaction policy to coordinate transactions or business activities for web services
  • Use WS-Policy to exchange policies in a standard format
  • Assembling web services applications
  • Deploy web services applications onto application servers
  • Administer deployed web services applications
  • Making deployed web services applications available to clients
  • Create a monitor for WAS for WSDM resources (deprecated)
  • Secure web services applications at the transport level
  • Authenticating web services clients using HTTP basic authentication
  • Manage policy sets
  • Testing web services-enabled clients
  • Monitor the performance of web services applications
  • Tune Web Services Security for v9.0 applications
  • Configure the Kerberos token for Web Services Security
  • Troubleshoot web services
  • Example: Installing a web services sample with the console
  • Enable web services through the service integration bus
  • Use WS-Notification for publish and subscribe messaging for web services
  • Web services migration scenarios: JAX-RPC to JAX-WS and JAXB
  • Web services migration best practices
  • IBM proprietary SOAP over JMS protocol (deprecated)
  • Programming model APIs and specifications
  • WAS roles and goals
  • Web services hints and tips: JAX-RPC vs JAX-WS
  • Web services hints and tips: JAX-RPC vs JAX-WS Part 2