package cn.sxy.client;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import cn.sxy.servcie.User;
import cn.sxy.servcie.WsTest;
public class ClientTest {
public static void main(String[] args) {
JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
factoryBean.setServiceClass(WsTest.class);
//java测试地址http://localhost:8083/cxfws?wsdl
factoryBean.setAddress("http://localhost:8083/cxfws?wsdl");
WsTest UserService = (WsTest)factoryBean.create();
User user = UserService.getUser("xiao","123");
System.out.println("User的返回值:"+user);//将来你的服务就是这样返回给调用你服务的人
}
}