xfire实现webservices,拿对象拿到的是空。
Clinet代码public static void main(String[] args) {
Service srvcModel = new ObjectServiceFactory()
.create(HelloWordService.class);
XFireProxyFactory factory = new XFireProxyFactory(XFireFactory
.newInstance().getXFire());
String url = "http://localhost:8080/ws/services/HelloWord";
try {
HelloWordService srvc = (HelloWordService) factory.create(
srvcModel, url);
User user = srvc.getUser();
System.out.println(user.getName());
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
在Client下有一个接口
public inte易做图ce HelloWordService {
public String sayHello(String name);
public User getUser();
}
sayHello方法可以用的。。但是拿User 可以拿到对象。 user.getName输出为空
补充:企业软件 , WebSphere