IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

Accessing Web services by using the Web services connector

Procedure

Accessing the Web services is very easy as we can expose it as a real service interface. We can write the following code:
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.



Feedback