1. Tools: eclipse3.3 or eclipse with WebService plugin
2. First visit the WebService site with a browser, then save the open page with the suffix. wsdl.
3. Copy the saved files into Eclipse's project.
4.eclipse:file----NEW---Other----WebService----Web service client, select the. wsdl file that was previously copied to eclipse and click Finish.
This allows eclipse to automatically generate a Web service client for us, and then just call it in the program.
Call the Eclipse Auto-generated Web service client in your program:
String endpoint = "WebService address of the server";
Yourwebservicenameproxy ywsnp = new yourwebservicenameproxy ();
Ywsnp.xxx method (enter parameter);
Such as:
String enpoint = "http://www.webxml.com.cn/WebServices/TranslatorWebService.asmx?wsdl"; Translatorwebservicesoapproxy translatorwebservicesoapproxy = new Translatorwebservicesoapproxy (); String[] Result =translatorwebservicesoapproxy.getencntwowaytranslator ("cat");
Eclipse automatically generates webservice calling client based on the. wsdl file