Using WebSphere Studio V5.1.1 to develop JSF applications

Source: Internet
Author: User
Tags web services websphere application server

Introduction

This article is the 5th part of a series of articles showing the features of the Java Server Faces Technology Preview in WebSphere Studio V5.1.1.

In the 4th part of this series, we describe how JSF leverages the existing Java EE technology, which uses JavaBean data controls to create a JSF page that invokes an existing EJB application. In this final installment, we will use the JSF Web Services component to invoke the Web service.

The JSF Web Services component can search for any standard Web service on the Internet or build input and output controls for invoking Web services and display results. In this exercise, we will use the JEB JAR in Part 4 to build and deploy the Web service. Then we use the JSF Web service to build the control that runs the Web service.

To complete this exercise, you will need to use the content created in Part 4 of this series. If you have not completed part 4th, the download file contains a solution for this section. Import the EAR file described in the previous article, and follow the test instructions described in Part 4. To run this example, you need to create the database described in part 3rd. If you have not finished part 3rd, import the solution and run the application to create the JDBC data source in the server configuration that this article will use.

Building a Web service from an existing EJB

The JSF Web Services component searches the Internet for existing UDDI registrations and then uses the WSDL file to generate the appropriate controls. Control uses a standard JAX-RPC API to invoke a Web service. In the beginning, we build a WEB service from an existing EJB component, deploy it, and then use the JSF control to build it from the running WebSphere application Server Test environment. This shows how quickly we can build Web services and Web service clients from the WebSphere Studio application Developer (hereafter called Application Developer). In this exercise, we'll use the Accesscompanyinfo method in the Stockfacade session Bean:

In Application Developer, select File => New => from the main menu, and then select Web Services from the list on the left, and select the Web Service in the right panel (Figure 1). Select Next.

Figure 1. To create a new XML service

In the Web Services dialog box (Figure 2), select the EJB Web service for Web services type and make sure that only the Start Web service in Web project and Create folders wh are selected En necessary option. Click Next.

Figure 2. WEB Service Options

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.