Keep on getting HTTP401 when trying to access my Sanbox-RM-Project with OSLC/Lyo2
Hi,
I just created a Sandboxproject for RequirementsManagement and tried to retrieve a Sample Requirement: https://jazz.net/sandbox02-rm/resources/_OnKPAZr4EeOKJfCEQZYPEg in Java using the Lyo2-Library. However, I keep on getting HTTP 401. Can you tell me please, what is the right way to authenticate? [code] OslcClient client = new OslcClient(); final String USERNAME = "XXX"; final String PASSWORD = "XXX"; final String RM_JAZZ = "https://jazz.net/sandbox02-rm/resources/_OnKPAZr4EeOKJfCEQZYPEg"; UsernamePasswordCredentials upc = new UsernamePasswordCredentials(USERNAME, PASSWORD); DefaultHttpClient httpClient = (DefaultHttpClient)client.getHttpClient(); httpClient.getCredentialsProvider().setCredentials(AuthScope.ANY, upc); try { ClientResponse resource; resource = client.getResource(RM_JAZZ, MediaType.APPLICATION_XML); // <-- iS HTTP401 [/code] thanks in advance David |
One answer
Hi,
Have you checked the Lyo code samples for RM ? https://jazz.net/library/article/1382 |
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.