It's all about the answers!

Ask a question

Issue regarding RRC project Area collection REST API


Ajay Gera (3137) | asked May 20 '13, 12:28 p.m.

I am facing issue in using project area collection REST API via code(POST and GET both).  I am using the form based authentication but I am not able to authenticate successfully. 
 
https://<server>:<port>/rm/processProxy?uri=https://<server>:<port>/jts/process/project-areas
 
while same steps is working for retrieving single project area details.
 
https://<server>:<port>/jts/process/project-areas/<projectKey
>
 
Step1:   Requesting https://<server>:<port>/jts/process/project-areas/<projectKey>
Step2:    If not authenticated then posting login form using  https://<server>:<port>/jts/process/j_security_check>
Step3:   Requesting https://<server>:<port>/jts/process/project-areas/<projectKey> again
 

I am follwing same steps for posting project area and getting all project areas but it is not working for me from code..same is working for me via firefox REST client..

Ajay Gera



3 answers



permanent link
Gabriel Ruelas (1.1k13) | answered May 20 '13, 5:32 p.m.
Hi,
The OSLC Workshop ( https://jazz.net/library/article/635 ) contains sampel code for Form authentication in RRC. PLS check example04 in the code.

Best regards

permanent link
Ajay Gera (3137) | answered May 21 '13, 11:09 a.m.
edited May 21 '13, 11:13 a.m.

Hi,

I did some code changes as my requirement is different from example04(as i need to create project area in /rm not in /ccm and adding memebers to existing/new project area). but still not working for me.

For Posting project Area I am doing following steps:

Step 1: Http post to https://<server>:<port>/rm/processProxy?uri=https://<server>:<port>/jts/process/project-areas
Step2: if authentication required then posting request to
https://<server>:<port>/jts/process/j_security_check
Step 3: Http post to https://<server>:<port>/rm/processProxy?uri=https://<server>:<port>/jts/process/project-areas

Getting Request Timed out Error

For Adding Members in project Area I am doing following steps:

Step 1: Http post to https://<server>:<port>/jts/process/project-areas/<projectKey>/members
Step2: if authentication required then posting request to
https://<server>:<port>/jts/process/j_security_check
Step 3: Http post to https://<server>:<port>/jts/process/project-areas/<projectKey>/members

 

Getting 200 Ok back but members is not posting to project area.

I have tried same XML via Firefox REST Client. It is working fine for me.

Ajay Gera




permanent link
Gabriel Ruelas (1.1k13) | answered May 21 '13, 6:22 p.m.
Use the Example04 from net.jazz.oslc.consumer.rm.client, The method that handles the Form Authentication is HTTPUtils.doRRCOAuth.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.