需要对http://www.zhangjie.hn.cn/?p=449中所创建的CXF 服务进行测试,那么需要创建客户端。比如:
JaxWsProxyFactoryBean jfb = new JaxWsProxyFactoryBean();
jfb.setServiceClass(CustomerAction.class);
jfb.setAddress(“http://localhost:8080/customer?wsdl”);
CustomerActionas = (CustomerAction) jfb.create();
CustomerDto dto = as.login(“username”, “password”);
做测试时需要引入一个包:jaxb-impl-2.1.12.jar
下载地址:http://www.javaxxz.com/file.php?id=15526415
更多:http://www.javaxxz.com/thread-67152-1-1.html