System.out.println("==================================");
//测试通过远程代理方式调用远程服务
RemoteServiceDynamicProxy proxy = new RemoteServiceDynamicProxy();
ContactResource resource = proxy
.createRemoteService(ContactResource.class);
page = resource.listContacts(1, 2);
contacts = page.getResult();
for (Contact ct : contacts)
System.out.println(ct.getName());
}