There is no officially supported way to deploy a custom RESTful service on PPM Server.
If someone really wanted to do that they could copy their REST Application resources classes to WEB-INF/classes and edit <SERVER_HOME>/deploy/itg.war/WEB-INF/conf/wink_ws.app to add their Jax-RS resource class to the list to have it picked up by PPM RESTful Services server (Apache Wink), but that would be a bad idea as this is not supported and everything would be wiped out during every PPM upgrade (even during patch upgrades).
You'd rather manage your own server (JBoss AS7 or simpler things such as Grizzly + Jersey) to run your custom RESTful services. Unless for some reason you need them to run in PPM Server, but that likely means that you need to leverage some PPM native code, and there's little chance that what you are doing is encouraged or even supported by HP Support.
I have a class file loaded in \\c$\ITG\server\<server>\deploy\itg.war\WEB-INF\classes and edited wink_ws.app file to include that class file but when I call it through the command from workflow it gives me excel.ReadExcelDemo cannot be cast to com.kintana.core.server.execution.BaseCommand, below is the command ksc_run_java excel.ReadExcelDemo [REQ.REQUEST_ID]
Any idea what could be the issue? is there any guideline to deploy custom class files to PPM?
Your help is greatly appreciated. Thanks in advance
Thanks Utkarsh for your reply, I copied the jar files to web-inf/lib folder and tried to run but getting below error, Am i missing something?
Class file runs perfectly fine when executed on eclipse.
ERROR :CommandRunner for com.kintana.core.server.execution.CLLocalExecCommand Batch ID: 226759:com.kintana.core.executions.commands.localExec:2014/07/22-14:20:11.642 IST: Unexpected exception occurred running ksc_local_exec: java.io.IOException: Cannot run program "ReadExcelDemo": CreateProcess error=2, The system cannot find the file specified
One quick info about trying to use ksc_run_java: if you want to use this special command, the full class name you pass as a parameter MUST extend the PPM abstract class com.kintana.core.server.execution.BaseCommand. So yes, the error message is correct :)
However, ksc_run_java is supposed to be a PPM internal command. Nothing prevents you to create your own class extending BaseCommand, but it will be much easier to create an executable Java class and invoke it with ksc_local_exec or simply with command line java.exe execution like Utkarsh demonstratred.