http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx?WSDLgetCountryCityByIp 方法名
theIpAddress 参数名只用xfire调用webservice

解决方案 »

  1.   

    Client client;
    Object[] results = null;
    String result = null;
    String method = "addSheet";
    try {
      client = new Client(
     new URL("http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx?WSDL
    "));
       results = client.invoke(method, new Object[] {参数});
       result = results[0].toString();
    } catch (MalformedURLException e) {
    e.printStackTrace();
    } catch (Exception e) {
    e.printStackTrace();
    }
    return result;
      

  2.   

        public String axisWebService() {
    Client client;
    Object[] results = null;
    String result = null;
    String method = "getCountryCityByIp";
    try {
        client = new Client(
        new URL(
        "http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx"));
        results = client.invoke(method, new Object[] {"116.228.185.114"});
        result = results[0].toString();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (Exception e) {
        e.printStackTrace();
    }
    return result;
        }执行的时候出错