Difference between revisions of "Calling On Demand Tasks"
From PresenceWiki
(No difference)
|
Revision as of 11:55, 6 April 2009
There are 3 ways to call On Demand Tasks
1: Via a tag in the web file:-
<presence:remote-task presenceHost="presenceserver.com" alias="simple/>
2: Through the url by adding the 'task' item:-
http://localhost/task/newtime
3: Through the On Demand API:-
The jars you will need for this are:- presenceOnDemand.jar presenceCommon.jar pbtools57.jar pbembedded57.jar pbclient57.jar log4j-1.2.8.jar xercesImpl.jar
As well as this you will need to copy install.inf into a res directory and presenceconfig.xml into a res\config directoy
OnDemandRequest request = new OnDemandRequest(); request.setTimeOut(3000); request.setHost("192.168.1.103"); request.setPort(8221); request.setRequestParameters(null); request.setAlias("newtime"); try { request.makeRequest(); System.out.print (request.getResponse()); } catch (IOException e) { e.printStackTrace(); } catch (GeneralSecurityException gse) { gse.printStackTrace(); }