Thứ Bảy, 23 tháng 8, 2014

Use JAX - WS to develop SOA application

Đề bài : Happy Consumer International Bank (HCIB), a leading multinational organization having established branches all over the world is now starting its banking services in India. The Bank has employed you as a full time System Consultant with them. It wants to deploy a Web Service that will offer credit card validation and online banking facilities that are typically offered by all the multinational banks. The main priorities for the online banking system are reliability, availability and serviceability of the application. Additionally, the system should be highly scalable and secure as the bank expects substantial growth in the future. Consider yourself to be a part of the team that implements the credit card validation module. Develop a JAX_RPC based Web Service that exposes the boolean validateCreditCard(cardNumber) method. This method implements the logic for credit card number validation, and returns a boolean value indicating whether the card number is valid or not.
Bước 1: Tạo new project JavaWeb

Tạo một Web Application làm Servies
Tạo Web Servies.


Xử lý code cho file Web Services.

Test thử Web Services


Tạo new project Java Application là Client.
Tạo Web Services Client
Copy WSDL vừa test thử vào WSDL URL



Kéo thả validateCart vào file main trong Client.

Bước 8: Viết code cho main.

Kết quả sau khi Test.
Nhận xét:
- Code dễ dàng sử dụng mà sửa lỗi.

- Code gọn gàng và đơn giản.
- Web service sử dụng giao thức chuẩn mở nên có thể dùng cho nhiều client.
- Ứng dụng chạy Service khá chậm.

Không có nhận xét nào:

Đăng nhận xét