private static final QName SERVICE_NAME = new QName("http://tempuri.org/", "ServiceSoap");
private static final QName PORT_NAME = new QName("http://tempuri.org/", "ServiceSoapPort");
public static void main(String[] args) {
Service service = Service.create(SERVICE_NAME);
String endpointAddress = "http://www.ayandy.com/Service.asmx";
service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
ServiceSoap hw = service.getPort(ServiceSoap.class);
ArrayOfString as = hw.getWeatherbyCityName("上海", TheDayFlagEnum.TODAY);
for(String str : as.getString()) {
System.out.println(str);
}
}
}