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
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