WebSphere Studio Application Developer Version 5 Programming Guide part 50

WebSphere Studio Application Developer part 50 provides integrated development tools for all e-business development roles, including Web developers, Java developers, business analysts, architects, and enterprise programmers. The customizable, targeted, role-based approach of WebSphere Studio Application Developer will be characteristic of all new products built on the WebSphere Studio Workbench. It is well integrated with WebSphere Application Server and provides built-in server test environments that can be used for testing and profiling Web applications | Creating a Web service from a session bean Creating a Web service from an EJB session bean is very similar to the process for a JavaBean. There are only a few differences. Let us go through the process in abbreviated fashion In the J2EE Hierarchy view expand the ItsoProGuideEJB project. Select the BankEJB session bean and New - Other - Web Services - Web Service. The type of Web service is now preselected as EJB Web service. Select Generate a proxy and Test the generated proxy Select the ItsoProGuideWebServ project as the Web project. Leave all the defaults on the EJB configuration. Leave all the defaults on the identity. The URI is http i Leave all the methods selected. Leave the proxy class to . Leave the sample test application folder as sample BankEJB. Make sure the client project is ItsoProGuideWebServClient. Click Finish. The code is generated and the test client opens Figure 13-18 . Figure 13-18 Web service sample for EJB service 464 WebSphere Studio Application Developer Version 5 Programming Guide Notes If you encounter runtime errors restart the server. Methods that return collections are not supported in the test client because an instance cannot be created. The methods of our session bean return arrays of objects these are very well supported by SOAP encoding. Implementing a real client application We provide a very simple client consisting of one JSP to execute the deposit and withdraw methods of the Banking service Import the into the ItsoProGuideWebServClient project Web Content folder . The main logic is shown in Figure 13-19 - A proxy bean to invoke the Web service is allocated using useBean . - The parameters from the form are retrieved and tested. - Depending on the Submit button either the deposit or withdraw method of the Web service is invoked. - After the banking operation the getAccount method is invoked so that we can .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
24    19    1    28-11-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.