Project and Portfolio Management Practitioners Forum
cancel

Consuming Web Services from HP PPM

SOLVED
Go to solution
Highlighted
AlfredoMonasi
Honored Contributor.

Consuming Web Services from HP PPM

Hi Everyone,

 

Is there a way I can consume a Java or .Net Web Services from a workflow step? I was thinking maybe to do a Command Line app to with parameters all call it from an execution but I would like to know if there is a way to do it directly from a workflow.

 

Regards,

 

Alfredo

5 REPLIES
Etienne_Canaud
Micro Focus Expert
Solution

Re: Consuming Web Services from HP PPM

Hi Alfredo,

 

I don't know of any built-in Web Service client that you could use from a workflow step; you'll have to roll your own, either with a custom java command or a command line app.

 

Thanks,

Etienne.

Utkarsh_Mishra
Acclaimed Contributor.

Re: Consuming Web Services from HP PPM

Agree with Etienne; you need to call your web service via custom PPM commands.

 

There is one benefit in this that the logs are maintained on each call of web services; which is good for monitoring and debugging purpose.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
AlfredoMonasi
Honored Contributor.

Re: Consuming Web Services from HP PPM

Just to share it, I did a console application using c#, it worked just fine and using the Console.WriteLine funtion allowed me to register the logs of the app in the PPM.

 

I'm sharing the code.

 

Regards,

 

Alfredo 

parabkir
Valued Contributor.

Re: Consuming Web Services from HP PPM

Hi Utkarsh,

 

I am trying to consume a third party web service from a PPM execution step.

Is it possible to do so?

 

Can we use special commands or custom PPM commands for this purpose?

 

If you can share an example of such a command, it would be a great help.

 

Thanks,

Kiran

Thanks,
Kiran Parab
Utkarsh_Mishra
Acclaimed Contributor.

Re: Consuming Web Services from HP PPM

I had mention this solution in other post as well. You can follow these steps.

 

First Create a Jar file of your solution, you can use any Java IDE and build it.

 

Once Jar file is build copy the the file and libraies in /web-inf directory or create a new direcotry in <PPM_ROOT>

 

Now create a Command Execution step in the workflow. And the do as follow.

 

  1. First Identify the JAVA_HOME path as it will be needed in the command
  2. Location where your jar file is store
  3. Finally make sure that the environment used in the command is working fine i.e check transfer and connection protocol

 

ksc_connect_dest_server DEST_ENV="KINTANA_SERVER"
echo Running..
C:/Java/jdk1.6.0_16/bin/java -jar "C:\itg\webservices\my_project\PPM-CUSTOM.jar"
ksc_exit

 ------------------------------------------------------------------------------------------------------------

 

Another way ( below example is for Windows system, you can modify it for Unix)

 

  1. Create your project jar and then copy it in <PPM_ROOT>; say for example

     c:/itg/custom_java

    Also make sure to copy the lib folder (used by your jars as well)

  2. Now within custom_java folder create .bat file (name = run.abt) and put the contnent as
    Note: MY_PATH is your Java_home

    SET MY_PATH="C:\Program Files (x86)\Java\jre1.6.0_03\bin"
    
    cd %MY_PATH%
    
    %dir%
    
    %MY_PATH%\java -jar "D:\PPM_CUSTOM\ppm_http\PPM_HTTP.jar"

     


  3. Now call this .bat file in ppm command execution step


ksc_connect_dest_server DEST_ENV="KINTANA_SERVER"
echo Running..
cd c:/itg/custom_java
run.bat ksc_exit

 

 

-----------x----------------

 

Created a seperate post for it.

 

http://h30499.www3.hp.com/t5/Project-and-Portfolio-Management/Consume-external-web-service-using-PPM-command-or-execute-any/td-p/6560482#.U9pGzfldWVM

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)