You can invoke services within the WmART package (the service you’re calling is described in the Built-In Services Reference and so is a public service) but to invoke the services you must have a valid session. The form of doThreadInvoke you’re using does not accept a session var and so can only call public/unprotected services. Use the method that accepts a session object.
we are actually defining adapter for tamino database and defining a service for polling, i need to consume the polling interval mentioned in IS Admin Screen for my Tamino Adapter.
Do you have any idea of getting the session object…?
Isn’t the connection config passed to your adapter method? Or available via an ADK call? Are you sure you need it? I ask because I think the ART takes care of calling your polling notification every configured time period, it isn’t something you need to do explicitly. But I may be wrong. The ADK docs should have the answer.
Hi Reamon,
IS manages the call(polling call) made according to the interval specified.we need that time interval to place in the tamino query which executes as a result of polling.
One thing we found is, it is not only this service(queryPollingNotificationState)… we are not able to even call a simple service from the public folder( for ex we tried calling pub.string:length, it also gives us AccessException…)
we concluded that inside our polling class, we aren’t able to call any built-in services…
That sounds right since the adapter implementation does not run within the context of a session.
In reviewing the ADK User’s Guide, you should be able to retrieve the connection metadata from the connection that your notification class retrieves via retrieveConnection(). In this case you’re after “notificationInterval” I think. I think this is the way to go rather than trying to use built-in services from WmART.
Below are the sysout messages and the stacktrace of the exception.
Session Created: a891bc80386111dea8b9864ba00f3475
After invoking service: testServices:testTAIPollingAdministrator{sha1}vI5TC3V31V
doYdyukqpb7AYXHXQ=
Before s.invoke(user, NSName.create(serviceName), Values.use(input));
java.lang.ClassCastException: com.wm.lang.ns.NSName
at com.wm.pkg.art.util.ExtendedNotificationUtils.queryPollingNotificatio
nState(ExtendedNotificationUtils.java:1385)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:403)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java
:631)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(Reserv
ationProcessor.java:40)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsPr
ocessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCom
pletionImpl.java:241)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProces
sor.java:51)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:228)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProces
sor.java:30)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:62
4)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:
536)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:
381)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:237)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:119)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:91)
at com.wm.app.b2b.server.SessionInvoke.run(Session.java:837)
at com.wm.util.pool.PooledThread.run(PooledThread.java:118)
at java.lang.Thread.run(Thread.java:595)