At this point we have a defined adapter but no implementation for the server side procedure which
calls the back-end service. We open up the "Senators-impl.js" implementation file for the
adapter. We need none of the code templated by IBM. Instead we code only:
function getSenatorByState(state) {
var options = {
"method": "get",
"path": "getall_sens_bystate.php",
"returnedContentType": "xml",
"parameters": {
"state": state
}
};
return WL.Server.invokeHttp(options);
}
Finally, in the Connection Policy of the adapter definition, we supply the connection information
for the server machine:
Page 76
Kommentare zu diesen Handbüchern