网址
- 不能执行,.asmx结尾。
解决
package com.atguigu.client; import java.util.List; import cn.com.webxml.ArrayOfString; import cn.com.webxml.WeatherWS; import cn.com.webxml.WeatherWSSoap; public class MainClient { public static void main(String[] args) { //找接口 WeatherWSSoap weatherWSSoap = new WeatherWS().getWeatherWSSoap(); ArrayOfString weather = weatherWSSoap.getWeather("南宁", ""); List<String> list = weather.getString(); for(String string : list){ System.out.println(string); } } }