RTC OAuth consumer error
I am trying to retrieve the OSLC catalog from the RTC url :
https://rtc:9444/ccm/oslc/workitems/catalog using OAuth. I generated a consumer (Inbound) key with a secret.
I supplied this key and invoked the getRequestToken on the OAuthClient but I got back a 'invalid_consumer_key' message.
I skipped this step an invoked the access method, I got back a 'parameter absent' message. I sent the consumer key,secret,realm,oauth parameters as per the OAuth specification.
Can someone please guide me on the correct way to retrieve the catalog ?
https://rtc:9444/ccm/oslc/workitems/catalog using OAuth. I generated a consumer (Inbound) key with a secret.
I supplied this key and invoked the getRequestToken on the OAuthClient but I got back a 'invalid_consumer_key' message.
I skipped this step an invoked the access method, I got back a 'parameter absent' message. I sent the consumer key,secret,realm,oauth parameters as per the OAuth specification.
Can someone please guide me on the correct way to retrieve the catalog ?
4 answers
Have you looked at https://jazz.net/library/article/635 ?
You might also want to provide more context on what you are trying to do and how.
Thanks Ralph. I will look into the article.
I need to write a client application that lists the Project areas (and downwards like Defects etc) present on my RTC server. I intend to do this starting from the CCM Rootservices and extracting the CM providers. I have been able to retrieve the CCM rootservices document and from that the catalog URL. This is the snippet of the code I use.
OAuthServiceProvider serviceProvider = new OAuthServiceProvider(RURL, UURL, AURL);
OAuthConsumer consumer = new OAuthConsumer(null, "secret", "key", serviceProvider);
OAuthAccessor accessor = new OAuthAccessor(consumer);
//Setup the client that is set up with SSL.
OAuthClient client = new OAuthClient(new HttpClient3(new MyCustomSSLClient()));
//Attempt to get a request token from the provider
try {
try {
client.getRequestToken(accessor); -> throws exception 'invalid consumer key'
} catch (OAuthProblemException e) {
Collection<OAuth> parameters = new ArrayList<OAuth>();
OAuth.Parameter param = new OAuth.Parameter("oauth_consumer_key", consumer.consumerKey);
parameters.add(param);
param = new OAuth.Parameter("oauth_consumer_secret", consumer.consumerSecret);
parameters.add(param);
param = new OAuth.Parameter("realm", "Jazz%20Team%20Server");
parameters.add(param);
param = new OAuth.Parameter("oauth", "OAuth");
parameters.add(param);
OAuthMessage req = new OAuthMessage(OAuthMessage.GET, uri, parameters); -> uri is the catalog url
OAuthMessage request = client.access(req, ParameterStyle.BODY); -> throws exception 'parameter absent'
You might want to consider posting questions like that in the Extending Team Concert forum. That forum is also a good source to search for similar questions. The Advanced Search might be useful too. i would also search developerworks for articles.
I assume you would provide a user ID and a password. you would not need a registration as friend. If you register as friend I would assume you need to set a functional user ID. However, O have not had time to play much with OSLC.
I assume you would provide a user ID and a password. you would not need a registration as friend. If you register as friend I would assume you need to set a functional user ID. However, O have not had time to play much with OSLC.