Import Java. util. using list; import Java. util. list; import Java. util. map; import Java. util. vector; import javax. XML. namespace. QNAME; import Org. apache. axis. client. call; import Org. apache. axis. client. service; public class putweather {private string url = "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx"; // provide the address of the interface private string soapaction = "http://WebXml.com.cn/"; // domain name, this is the public putweather () {string city = "Beijing"; Service = new service (); try {call = (CALL) service defined on the server. createcall (); call. settargetendpointaddress (URL); call. setoperationname (New QNAME (soapaction, "getweatherbycityname"); // you can specify the method to call. addparameter (New QNAME (soapaction, "thecityname"), // you can specify Org. apache. axis. encoding. xmltype. xsd_string, javax. XML. RPC. parametermode. in); call. setreturntype (New QNAME (soapaction, "getweatherbycityname"), vector. class); // data type to be returned (custom type) // call. setreturntype (Org. apache. axis. encoding. xmltype. xsd_string); // (standard type) Call. setusesoapaction (true); call. setsoapactionuri (soapaction + "getweatherbycityname"); vector v = (vector) Call. invoke (new object [] {city}); // call the method and pass the for (INT I = 0; I <v. size (); I ++) {system. out. println (v. get (I) ;}} catch (exception ex) {ex. printstacktrace () ;}} public static void main (string ARGs []) {putweather PW = new putweather ();}}