备忘录:做个笔记,收集一下。
记录:NO.216
本例环境:
下载地址:http://cxf.apache.org/
场景:
webservice发布服务,近期多的挺多。
方式一:
1.例子
public class CxfClients {
public static void main(String []args){
JaxWsDynamicClientFactory wsdcf = JaxWsDynamicClientFactory.newInstance();
String wsdlAddr = "http://127.0.0.1:8080/agcxf/ws/weather?wsdl";
Client cli = wsdcf.createClient(wsdlAddr);
String method = "queryToday";
Object[] obj = null;
try{
obj = cli.invoke(method, "");
System.out.println(obj[0].toString());
}catch(Exception e){
e.printStackTrace();
}
}
}
......
以上,感谢。