Question on calling a service from RTC WebUI
![]()
Serghei Zagorinyak (48●1●9●13)
| asked Aug 07 '12, 9:08 a.m.
retagged Aug 09 '12, 10:52 a.m. by Vladimir Amelin (704●7●22●26) Hi! I'm new to Jazz and RTC and have faced a task of creating a simple plugin. I have a service plugin providing com.example.hellojazz.common.service.IHelloJazzService (took it from this tutorial) and a web page com.test.app.ui.web.ui.internal.page.pageTest from here. When I run the page with contents from the tutorial, it works fine. But when I add some code to call my service, I get Resource does not exist: com.test.app.ui.web.ui.internal.page.pageTest.js exception. The page is in the same place, of cource. Below is the code of the page, bold is the one I added (from here, listing 6-8). I'll be grateful for any help on this problem. -------------------
dojo.provide("com.test.app.ui.web.ui.internal.page.pageTest");
|
Accepted answer
2 other answers
![]() I've altered the service invocation code to look like this: var self= this;var handlerObject= { success: function(resultList) { self._displayResults(resultList); }, failure: function(errorObj) { self.handleError(errorObj,"Error getting remote data."); } }; var responseHandler= new ServiceResponseHandler(handlerObject, "success", "failure"); var reqParms= { }; var serviceRequest = new ServiceRequest("com.example.hellojazz.common.service.IHelloJazzService", "sayHello",reqParms ); var cback = TeamServerClient.invokeService(serviceRequest, srh); Now the page loads, but I get a JavaScript error: TypeError: _13.match(_14) is null which comes from
com.ibm.team.repository.web.transport.ServiceRequest._validateMethod=function(_13){ if(!dojo.isString(_13)){ return false; } var _14=/^(get|post)/; var _15=_13.match(_14)[0]; return _15!==null; }; and actually says nothing to me except that something is wrong with my service request. |