tailieunhanh - Java Development with Ant phần 7

Bằng văn bản cho khách hàng Java Sau khi vượt qua bài kiểm tra, chúng tôi có thể viết các khách hàng Java thực:Nó tìm thấy và liên kết với các dịch vụ. Nó lấy ra và hiển thị các thuật ngữ tìm kiếm trước đó, sự tò mò. Nó sẽ gửi số đầu tiên của ứng dụng của chúng tôi các dịch vụ web như một thuật ngữ tìm kiếm, và in kết quả. | Writing the Java client After the tests pass we can write the real Java client import soapapi. public class Searchclient public static void main String args throws Exception SearchServiceServiceLocator locator locator new SearchServiceServiceLocator service String lastTerm last search lastTerm String results args 0 for int i 0 i i results i This client has three stages. o It finds and binds to the service. c It retrieves and displays the previous search term for curiosity . d It sends the first argument of our application to the web service as a search term and prints the results. We have to run the program of course so let s write a target to invoke it with java target name run depends test java classname Searchclient fork true failonerror true arg value deployment classpath path refid pathelement location classpath java target What happens when we run this Well we run the search and get a list of Ant documents that contain the word deployment java last search deployment java home ant docs manual OptionalTasks java home ant docs manual OptionalTasks . java home ant docs manual Integration Writing a client for our soap service 375 This means we have completed our example web service from integration with our application all the way to our client including both configuration checks to probe for Axis and client-side functional tests to verify that the service does what we expect. We are now very close to being able to declare the service ready for production. One missing item is the extra server-side functionality to retrieve the indexed files we will leave this until version . What we do have to do for version is verify that our service is interoperable. What is interoperability and why is it a problem Interoperability or interop as .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG