Network Deployment (Distributed operating systems), WAS v8.0 > End-to-end paths > Web services


Task overview: Implement web services applications


  1. Plan to use web services

  2. Migrate existing web services

    JAX-RPC remains supported. Existing JAX-RPC applications wanting to use JAX-WS features must be rewritten using JAX-WS. SOAP 1.2 and SOAP MTOM are only available within JAX-WS 2.x and JAXB 2.x. For web services based on Apache SOAP, you can migrate applications developed using versions v4.0 through v5.0.1.

  3. Develop web services applications...

    1. From WSDL files using JAX-WS

      We can create a JAX-WS web service by starting with an existing WSDL file describing the service interface for a JavaBeans or enterprise beans 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.

    2. Using JAX-WS

      Standard, annotation-based model. Incorporate XML data and process functions in Java applications. Send binary attachments, such as images or files, with the web services requests.

      New feature: WAS v8.0 includes support for singleton session enterprise beans as JAX-WS endpoints. Singleton session beans are useful in situations where a single instance of a web services endpoint implementation bean is needed to process all requests that are received for a particular web services endpoint. Perhaps, the single instance of the bean needs to share state information across requests. Typically, a new instance of a web services endpoint implementation bean is created to process each request.

      When developing a JAX-WS Web service starting from existing JavaBeans or from stateless or singleton session enterprise beans, you can expose the bean as a web service by adding one of the following annotations...

      • @WebService
      • @WebServiceProvider

      Enterprise beans exposed as JAX-WS web services must be packaged in EJB 3.0 or higher modules.

      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 WSDL file.

    3. Through service integration technologies

      We enable web services on a service integration bus to...

      • Make an internally hosted service available as both a bus destination and 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 to a new web service.

    4. JAX-WS web services clients

      Web services clients that can access and invoke JAX-WS web services are developed based on the Web Services for Java EE specification. WAS v8 supports...

    5. From existing WSDL files with JAX-RPC

      We can create a JAX-RPC 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.

    6. With JAX-RPC

      We can use the JAX-RPC programming model to develop web services. When developing a JAX-RPC web service starting from existing JavaBeans or enterprise beans, you need develop a WSDL file. We can use existing JavaBeans or enterprise beans and then enable the implementation for web services.

    7. Develop and deploy JAX-RPC web services clients We can develop web services clients based on the Web Services for Java EE specification and the Java API for XML-based remote procedure call (JAX-RPC) specification. WAS v8 supports Enterprise JavaBeans™ (EJB) clients, Java EE application clients, JSP files and servlets that are based on JAX-RPC.

    We can develop web services to take advantage of Web Services Addressing (WS-Addressing), Web Services Resource Framework (WSRF), and Web Services Transaction (WS-Transaction) support.

    • Use the WS-Addressing SPI: Performing more advanced Web Services Addressing tasks.

      We can develop web services to take advantage of Web Services Addressing (WS-Addressing), which aids interoperability between web services using a standard way to address web services and providing addressing information in messages.

    • Create stateful web services using the Web Services Resource Framework.

      With the Web Services Resource Framework (WSRF) support in the application server, you can implement a stateful web service as a WS-Resource, and reference that service it using a WS-Addressing endpoint reference.

    • Use WS-Transaction policy to coordinate transactions or business activities for web services.

      WS-Transaction is an interoperability standard that includes the WS-AtomicTransaction, WS-BusinessActivity, and WS-Coordination specifications. The Web Services Atomic Transaction (WS-AT) support in the application server provides transactional quality of service to the web services environment. Distributed web services applications, and the resources they use, can take part in distributed global transactions. With Web Services Business Activity (WS-BA) support in the application server, web services on different systems can coordinate activities that are more loosely coupled than atomic transactions. Such activities can be difficult or impossible to roll back atomically, and therefore require a compensation process if an error occurs.

    • Use WS-Policy to exchange policies in a standard format.

      WS-Policy is an interoperability standard used to describe and communicate the policies of a web service so that service providers can export policy requirements in a standard format. Clients can combine the service provider requirements with their own capabilities to establish the policies required for a specific interaction.

  4. Assemble web services.

    Read about what assemble a web service and the order in which to assemble the parts, for example an 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. Administer deployed web services.

    Once your web services application is deployed, you can configure security settings, view deployment descriptors and WSDL documents, set the scope of a Web service port, and manage policy sets and service providers. These tasks can be done using the admin console or with command-line tools.

  7. Secure web services.

    • Manage policy sets .

      Read about creating policy sets that you can use to simplify the security configuration of your web services applications. Policy sets are only supported by JAX-WS applications.

    • Review standards and programming models for web services message-level security.

      Consider a broad set of security requirements, including authentication, authorization, privacy, trust, integrity, confidentiality, secure communications channels, delegation, and auditing across a spectrum of application and business topologies.

  8. Publish the WSDL file.

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

  9. Monitor the performance of web services applications.

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

  10. 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 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 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 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
Plan to use web services
Web services migration scenarios: JAX-RPC to JAX-WS and JAXB
Web services migration best practices
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
Run 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
Run an unmanaged web services JAX-RPC client
Use HTTP to transport web services
Use SOAP over JMS to transport web services
Develop applications that use Web Services Addressing
Create stateful web services by using the Web Services Resource Framework
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
Make deployed web services applications available to clients
Create a monitor for WAS for WSDM resources (deprecated)
Secure web services applications at the transport level
Authenticate web services clients using HTTP basic authentication
Manage policy sets
Test web services-enabled clients
Monitor the performance of web services applications
Tune Web Services Security for v8.0 applications
Troubleshoot web services
WAS roles and goals
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
Add assured delivery to web services through WS-ReliableMessaging
Configure the Kerberos token for Web Services Security
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
IBM proprietary SOAP over JMS protocol (deprecated)
Specifications and API documentation
Web services hints and tips: JAX-RPC vs JAX-WS
Web services hints and tips: JAX-RPC vs JAX-WS Part 2

+

Search Tips   |   Advanced Search