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

Accessing list of work items which are having specific text using oslc api

Hello Everyone,


I am using CLM 6.0.6.
I want to access RTC work items which are having specific text using oslc API.
As I am new to OSLC API, I have followed OSLC workshop and I got some hint that I can use ?oslc.searchTerms="XXX" to search work items having specific text.

So I use code to accessed following URL:
1)I got Catalog URL.
2)I got Service provider URL
3)I got Simple Query URL: https://ketaki-pc/ccm/oslc/contexts/_WOOUkGc4Eemuucw8hGUKiw/workitems and also able to accessed all work items
4) But while accessing work items having specific text, I am getting exceptions
I use below code :
String queryWIs =simpleQueryURI+"?oslc.searchTerms=\"BI\"";                                         

HttpGet query = new HttpGet(queryWIs);         //getting exception on this line of code.

Execeptions are:
1) Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in query at index 87: https://ketaki-pc/ccm/oslc/contexts/_WOOUkGc4Eemuucw8hGUKiw/workitems?oslc.searchTerms="BI"
2)  java.net.URISyntaxException: Illegal character in query at index 87: https://ketaki-pc/ccm/oslc/contexts/_WOOUkGc4Eemuucw8hGUKiw/workitems?oslc.searchTerms="BI"

Kindly help me where I am wrong and how we can use searchTerms in OSLC??

0 votes


Accepted answer

Permanent link

It resolved.

We need to use ASCII code for special characters.
I use below URL:
String queryWIs =simpleQueryURI+"?oslc.searchTerms=%22BPM%22";

Ralph Schoon selected this answer as the correct answer

0 votes

Comments

Thanks for sharing. 

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

Question asked: May 14 '19, 12:41 a.m.

Question was seen: 1,491 times

Last updated: May 14 '19, 8:14 a.m.

Confirmation Cancel Confirm