Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Help in PPM Web Service

SOLVED
Go to solution
Highlighted
James++
Regular Collector

Help in PPM Web Service

Anyone who is using PPM 7.1 web services, please share how you have used the Out of the box web services.
I am trying to call Demand Service method getRequest, but it is giving some error. I had also done all the server configuration for the web services, and trying to call the services by a JAVA client with the help of SOA.pdf document and the web_toolkit which is provided by HP in SP5 of PPM 7.1 .

Can any one guide me how to call the web services.

Please check the attachment for the Error which I am facing.
26 REPLIES
Tim Brandish
Frequent Visitor

Re: Help in PPM Web Service

the first thing I would do is add this line to your code:

System.out.println("Request ID = " + requestId);

after this line:
String requestId = dm.createRequest(serviceURL);

the getRequest is based on the success of the createRequest. I would go into the web interface and look at the request that is created.

Are you using basic security or ws-securiity? does the user that you're making the ws call with have user access on the request type that you're creating and getting?
James++
Regular Collector

Re: Help in PPM Web Service

I have disabled the Basic & WS security. After this I am trying to create the request, but same error it was giving "Error in main, Not able to create request".
Then I tried for getRequest, but again same error.

Should I trying by enabling the WS security?

Alessandro Baio
Super Collector

Re: Help in PPM Web Service

Hi,
try to use the ws security, editing the "\java\conf\client-axix2.xml" accordingly, because it refers to the "admin" user.
Also, you have to set the password for the same username in the "PasswordCallbackHandler" class under the "examples.security" package.
Regards,
alessandro
James++
Regular Collector

Re: Help in PPM Web Service

Thanks Alessandro, but I had configured the "client-axix2.xml" as well as i had also set the password in "PasswordCallbackHandler" class.
But then Still the same error "Exception in thread main.. Unable to create request".
I had done all the configuration which are given in "PPM7.1_SOA.pdf" Document.

Can you tell the procedure or the client code, 'how you are invoking the PPM web service'.
Tim Brandish
Frequent Visitor

Re: Help in PPM Web Service

The createRequest call is trying to create a request of type "Bug." Try logging into the PPM GUI with the user you are using for web services and try to create a request of type "Bug." It may be disabled (it is in my instance). Your user may not have access to it.
James++
Regular Collector

Re: Help in PPM Web Service


The create request of type "BUG" is enabled on my instance, and I am creating the request by "admin" user.
Actually there was an error during the installation of SP5 patch, is this web service error is coming because of installation problem. But after this SP5 patch installation error then also every module is working fine in the instance. Till now I have not seen any problem in the instance.

Should I again install the SP5 patch?
Tim Brandish
Frequent Visitor

Re: Help in PPM Web Service

I'm looking at your call to the web service. You have the URL as:
http://localhost:8080/itg/ppmservices/DemandService

1. Is this the correct URL? I'm assuming from this URL that you have PPM installed on the same machine you're making the call from.

2. In my call, I have:
"http://myServerName.companyDomain.com:8080/itg/ppmservices/DemandService?wsdl"
so it looks like you could be missing the "?wsdl"
James++
Regular Collector

Re: Help in PPM Web Service

I am using this command to call the web service on command promt.

run_client.bat examples.dm.DemandServiceClient http://hcs-srv43232:8089/itg/ppmservices/DemandService

I don't know why it is showing this..localhost
D:\Resource\Webservice_toolkit\java\bin>rem run_client examples.dm.DemandServiceClient http://localhost:8080/itg/ppmservices/DemandService
on command line with error.

But on web browser when I am using this URL
http://hcs-srv43232:8089/itg/ppmservices/DemandService?wsdl
It is showing the WSDL.

Do I have to set any parameter to call the correct web service?
Tim Brandish
Frequent Visitor

Re: Help in PPM Web Service

change your call on the command line to this:

run_client.bat examples.dm.DemandServiceClient http://hcs-srv43232:8089/itg/ppmservices/DemandService?wsdl
Tim Brandish
Frequent Visitor

Re: Help in PPM Web Service

Please disregard my last post. I just tested it, and it works either way.
James++
Regular Collector

Re: Help in PPM Web Service

Hi Tim,

Thanks for your support, finally I am able to call the web services.
Can you please guide me how to get the fields values by getRequest().
Tim Brandish
Frequent Visitor
Solution

Re: Help in PPM Web Service

replace your getRequests method with the contents of the attached file.
James++
Regular Collector

Re: Help in PPM Web Service

Thanks Tim,

Its working and I am able to retrieve all the simple fields value.

Once again thanks for your support
Mamta_1
Super Collector

Re: Help in PPM Web Service

Hi,

Can anybody send me the client file for the attached code.
I am alos struck with teh same problem.

Thanks,
Mamta
santhoshkumar
Occasional Advisor

Re: Help in PPM Web Service

I have also stuck with same problem.Can anybody send the client code and where can i set the username and password?
Shravan Kathuri
Senior Member

Re: Help in PPM Web Service

Hi James++,

you said you are able to call webservices using PPM 7.1 SP5. When we tried the same, we are getting SSL related error.We have authentication mode as "ITG,Siteminder" in server.conf?

Can you provide me how to call webservice using SSO?


Thanks
Shravan.
Om Prakash Acha
Super Collector

Re: Help in PPM Web Service

Hello
Do you want to send dynamic user name and password through the java client to the web service.
As in the HP provided code you need to configure your user name in client.xml
and password in the PasswordCallBackHandler Class.

Thanks

Om Prakash Acha
Super Collector

Re: Help in PPM Web Service

Hi
The Web Service can be called through SSO. First of all, send the required details in URL to the SSO server, so you will receive a cookie in response to your URL. Use that cookie in the HTTP Header of your request each time you call different methods of the Web Services.
There is one restriction in it. There can be one Web Service Method call per session.

Thanks
Mahen M
Honored Contributor

Re: Help in PPM Web Service

Do you have any sample codes for this?

Regards,
Mahendran M
Om Prakash Acha
Super Collector

Re: Help in PPM Web Service

Please find the sample code
Mahen M
Honored Contributor

Re: Help in PPM Web Service

Thanks

Regards,
Mahendran M
Shravan Kathuri
Senior Member

Re: Help in PPM Web Service

Hi Om Prakash Acharya,

I am unable to download the file that you have attached. Could you please send this file to shravan.kathuri@ge.com

Thanks
Shravan kumar.K
BabyR
Occasional Contributor

Re: Help in PPM Web Service

I think, this is a browser issue in HP forums (IE+.zip) attachment. We can open this .zip attachment files from firefox.

Regards,
Jyotir ++
Member

Re: Help in PPM Web Service

Hi All,

I am not very sure but i think putting Server certificate file some time work calling Web services on SSO and HTTPS.

Hope this will help you.

Jyotir
//Add this to "OnDomLoad" event