WSConnector connnector = (WSConnector) Service.readObject("PeopleService "); if (null != connnector && (connnector.getProxy() instanceof PeopleServicesDelegate)) { PeopleServicesDelegate people = (PeopleServicesDelegate) conn.getProxy(); List<People> list = people.getAllPeoples(); }
PeopleService is the service we defined in the previous section. WSConnector has a very important interface that is getProxy(). As its name imply, it returns proxy for the real business interface. So all of the Web services operations can be consumed like invoking a POJO.