Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Cannot Acces OSLC Service Providers Catalog due to Authentication Error

Hello,

I have an RTC 4.0.0.1 installation and I am currently following the Open Services for Lifecycle Collaboration Workshop.  Instead of having a local server running, I have an actual RTC production environment..

I have managed to successfully run Example01 (how to access to the Root Services document) and Example02 (how to retrieve an attribute value) but I cannot complete Example03 (using form-based authentication to access the Service Providers catalog and list the Service Providers currently available) due to an authentication error.

The code is divided into two steps: (1) Request the Root Services document and parse the service provider catalog and (2) Access the service provider catalog and parse the service providers.  Step 1 works find and I can retrieve the service provider catalog URI.  The authentication error happens during step two when I have to access the URI.  Instead of getting status code 200 and proceeding, I get status code 401 Unauthorized:

HttpResponse catalogResponse = HttpUtils.sendGetForSecureDocument(server, catalogDoc, login, password, httpclient);

When I access the URI in Firefox with RESTClient I can retrieve the XML document.  The username and password that I use are the same as what I am using in Example03.  I have tried to manually insert the URI into the code instead of retrieving it in the first step, but I still get the same error.

What could be the causing the problem?

Best regards,

Andrew

0 votes



One answer

Permanent link
i had similar issues.. making httpclient a global variable helped my cause... you may want to try that...

0 votes

Comments

Hello Dinesh,


I tried defining httpclient as a global variable

public static HttpClient httpclient;

but it didn't help.

Regards,

Andrew

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Jun 19 '13, 4:22 a.m.

Question was seen: 4,327 times

Last updated: Jun 19 '13, 5:34 a.m.

Confirmation Cancel Confirm