CXF客户端动态调用webservice问题
public class WSClient {
public static void main(String[] args)throws Exception {
String wsdlUrl = "http://www.webxml.com.cn/webservices/chinatvprogramwebservice.asmx?wsdl";
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
Client client = factory.createClient(wsdlUrl);
Object[] res = client.invoke("getAreaString");
System.out.println(res[0]);
}
}
上面是我测试代码,电视台提供了Web Services,本地不希望保存WSDL,上面代码运行报错,求指导。
------解决方案--------------------http://blog.csdn.net/chenghui0317/article/details/9320053
试试这个。。