public class CxfClientTest {
public static void main(String[] args) throws Exception {
URL url = new URL("http://localhost:8080/finance/services/hello?wsdl");
LoginServiceImplService service = new LoginServiceImplService(url);
LoginService login = service.getLoginServiceImplPort();
MapConvertor convert = new MapConvertor();
MapEntry mapEntry = new MapEntry();
mapEntry.setKey("dasdas");
mapEntry.setValue("dddd");
convert.getEntries().add(mapEntry);
MapConvertor result = login.login(convert);
System.err.println(result);
}
}
本文将展示如何使用CxfClientTest类进行基于WSDL的远程服务调用,包括创建服务实例、配置URL、登录验证及发送请求等关键步骤。
339

被折叠的 条评论
为什么被折叠?



