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