Developing Web Services with Apache Axis 2 phần 3

Bước tiếp theo là xác nhận các tập tin WSDL để đảm bảo rằng nó phù hợp với tiêu chuẩn các dịch vụ web khác nhau. Để làm được điều đó, kích chuột phải vào file trong Eclipse và chọn "Xác nhận". Nếu có bất cứ điều gì sai, họ sẽ được báo cáo trong cửa sổ vấn đề. Ví dụ, ở đây tôi đã giới thiệu một lỗi vào tập tin: | Chapter 2 Implementing a web service 45 os Click it to see the whole schema I I gj concaLiResponse Then you ll see This looks fine. Now save the file. Validating the WSDL file The next step is to validate the WSDL file to make sure it conforms to the various web services standards. To do that right click the file in Eclipse and choose Validate . If there were anything wrong they would be reported in the Problems window. For example here I had introduced an error into the file 46 Chapter 2 Implementing a web service Generating a service stub Next in order to implement the web service you will generate a service stub see the diagram below . When a request message comes in the service stub will convert the concatRequest XML element into a ConcatRequest Java object. Then it will pass it to the concat method in a service skeleton to be supplied by you. Your concat method will create and return a ConcatResponse Java object. The service stub will convert it into a concatResponse XML element and return it to the client Chapter 2 Implementing a web service 47 4 Create and return a ConcatResponse object To implement this idea in Eclipse choose File New Other and choose Axis2 Code Generator see below . The default is to generate Java code from WSDL. This is what you want Click Next see below . Click Browse to locate your file

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
200    15    2    17-06-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.