1。使用xfire新的包:
xfire-aegis-1.2.6.jar
xfire-annotations-1.2.6.jar
xfire-core-1.2.6.jar
xfire-java5-1.2.6.jar
xfire-jaxws-1.2.6.jar
xfire-spring-1.2.6.jar
2.客户端代码示例
String url = "http://127.0.0.1:7000/wasuapt/services/UserValidateService";
Service serviceModel = new ObjectServiceFactory().create(UserValidateService.class);
UserValidateService service;
try {
service = (UserValidateService) new XFireProxyFactory().create(serviceModel, url);
Client client = Client.getInstance(service);
client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, "5000");
userValidate = service.commandUserValidate(inMap);
} catch (MalformedURLException e) {
log.error("用户校验:远程调用执行异常! " + e);
e.printStackTrace();
}
"5000"是超时时间,"0"表示不限时间。