Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The type org.apache.cxf.endpoint.dynamic.DynamicClientFactory cannot be resolved. It is indirectly referenced from required .class files
The type org.apache.cxf.endpoint.dynamic.DynamicClientFactory cannot be resolved. It is indirectly referenced from required .class files
The method createClient(String) is undefined for the type JaxWsDynamicClientFactory
使用cxf动态创建客户端
JaxWsDynamicClientFactory fac=JaxWsDynamicClientFactory.newInstance();
fac.createClient("http://localhost:8080/cxf/services/HelloWorld?wsdl");;
要引入cxf-rt-frontend-simple-3.1.5.jar,JaxWsDynamicClientFactory因为继承了其中的DynamicClientFactory