1.生成接口文件
wsimport -d F:/test -keep -verbose http://ws.webxml.com.cn/WebServices/WeatherWS.asmx?WSDL
2.写测试代码
public static void main(String[] args) {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(BusinessNoCardService2.class);
factory.setAddress("http://ws.webxml.com.cn/WebServices/WeatherWS.asmx");
BusinessNoCardService2 client = (BusinessNoCardService2) factory.create();
String xml ="aa";
String re = client.idCardQuery(xml);
System.out.println("获取返回结果:" + re);
}