Use WSIMPORT to generate a proxy in the local, call an example of the WebService service interface

For this interface, I chose the interface for querying the attribution information through my mobile phone number. Check the address of this interface: http://ws.webxml.com.cn/ WebServices/MobileCodeWS.asmx

The first step: find the interface url and understand the several calling methods supported by the interface

Note that there are four access methods: soap, soap12, get,post

Step two: in Use wsimport command to generate proxy locally

Command:

wsimport -s ./ -p com.lkm.wximport http://ws. webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl

-s ./ means that the generated proxy class is placed in the current directory;

-p com.lkm.wximport is to generate The package path stored by the proxy class is defined according to the package path of your project, because these classes are to be put into the project later

Note: The content of the following three warnings here means these three None of the calling methods are supported, that is, the first one is soap

After execution, the proxy class will be generated in the corresponding directory

Step 3: Copy the generated proxy to the src of the project

Part IV : Calling the webservice interface by calling the proxy class

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3535 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.