tailieunhanh - Java & XML 2nd Edition solutions to real world problems phần 8

Tôi sẽ không bình luận nhiều vào giao diện này, vì nó khá tự giải thích. Tuy nhiên, bạn nên biết rằng trong các gói phần mềm , có một subinterface DOMLocator. Giao diện này cho biết thêm các phương pháp getOriginatingNode (), trả về | Java XML 2nd Edition This program captures the URL of the SOAP server to connect to as well as information needed to create and add a new CD to the catalog. Then in the add method the code creates the SOAP Call object on which all the interesting interaction occurs. The target URI of the SOAP service and the method to invoke are set on the call and both match up to values from the service s deployment descriptor from Example 12-5. Next the encoding is set which should always be the constant unless you have very unique encoding needs. The program creates a new Vector populated with SOAP Parameter objects. Each of these represents a parameter to the specified method and since the addCD method takes two String values this is pretty simple. Supply the name of the parameter for use in the XML and debugging the class for the parameter and the value. The fourth argument is an optional encoding if a single parameter needs a special encoding. For no special treatment the value null suffices. The resulting Vector is then added to the Call object. Once your call is set up use the invoke method on that object. The return value from this method is an instance which is queried for any problems that resulted. This is fairly self-explanatory so I ll leave it to you to walk through the code. Once you ve compiled your client and followed the instructions earlier in this chapter for setting up your classpath run the example as follows C javaxml2 build java http localhost 8080 soap servlet rpcrouter Riding the Midnight Train Doc Watson Adding CD titled Riding the Midnight Train by Doc Watson Successful CD Addition Example 12-7 is another simple class CDLister which lists all current CDs in the catalog. I won t go into detail on it as it s very similar to Example 12-6 and is mainly a reinforcement of what I ve already talked about. Example 12-7. The CDLister class package javaxml2 import import .

crossorigin="anonymous">
Đã 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.