Developing Web Services with Apache Axis 2 phần 4

Tiếp theo, để thực hiện các dịch vụ web, bạn sẽ tạo ra một "sơ khai dịch vụ" (xem sơ đồ dưới đây). Khi một tin nhắn yêu cầu, còn sơ khai dịch vụ này sẽ chuyển đổi các phần tử XML vào một đối tượng ConcatRequest Java. | Chapter 3 Optimizing the development environment 67 public class simpleServiceSkeleton implements SimpleServiceSkeletonlnti public concat concatRequestO String result ConcatResponse response new ConcatResponse hello result return response Choose Open Debug Dialog The following window will appear Right click Remote Java Application and choose New . Name this configuration Debug Axis it doesn t really matter . Make sure your SimpleService project is selected and make sure the port is 8000 68 Chapter 3 Optimizing the development environment Click Debug to connect to the JVM running the Axis server. Now run the client to call the web service. Eclipse will stop at the breakpoint Debug fe Hierarchy Sfc - w 3. X . 3Ã I E J Debug Axis Remote Java Application - 4 Java HotSpot TM Client VMQoealho t8000 8 Thread DestroyJavaVM Running k 8 Thread HttpListener-8080-1 Running Daemon Thread Timer-1 Running S Daemon Thread Timer-0 Running s -Qp Thread HttpConnection-8080-1 Suspended breakpoint at line 15 in SimpleServiceSkeleton ConcatRequest line 15 MessageContext MessageContext line 53 SimpleServiceMessageReceiverInOut Abstra tInOutSyncMessageReceiver .invokeBusinessLogic Message package coin ttdev. ss e SimpleServiceSkeleton java skeleton for the axisService public class SimpleServiceSkeleton implements SimpleServiceSkeletonlnte public concat concatRequestO String result 0 ConcatResponse response new ConcatResponse response . setConcatResponse hello rr result return response Then you can step through the program check the variables and whatever. To stop the debug session choose the SimpleService in the Debug window and click the Stop icon Chapter 3 .

Bấm vào đây để xem trước nội dung
TÀI LIỆU MỚI ĐĂNG
Đã 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.