It's all about the answers!

Ask a question

QueryCabability using OSLC RM API


Monali Jambhulkar (841640) | asked Nov 27 '18, 3:49 a.m.

 Hello All,


I am trying to run Example 05 to find out of the artifacts created based on modified date.(Sample example provided in OSLC workshop )

i am using below code to search based on Modified date in code:

String oslcSearchForVisionQuery = queryCapabilityURI +
                           "&oslc.prefix=" + URLEncoder.encode("dcterms=<http://purl.org/dc/terms/>", "UTF8") + "," +
                                             URLEncoder.encode("types=<http://www.ibm.com/xmlns/rdm/types/>", "UTF8") + "," +
                                   "&oslc.select=" + URLEncoder.encode("dcterms:title", "UTF8") + "," +
                                                     URLEncoder.encode("types:PrimaryText", "UTF8") +
                                 // "&oslc.searchTerms=" + URLEncoder.encode("\"FRONT\"", "UTF8");
                                                    "&oslc.where=" + URLEncoder.encode("dcterms:modified>="+"2018-08-01T21:51:40.979Z%5E%5Exsd%3AdateTime","UTF8");

When I am running code , i am getting java.lang.Exception: Error occured while posting
HTTP/1.1 400 Bad Request error.

Can please let me know what changes need to do in this code?

Thanks


Comments
Ian Barnard commented Nov 27 '18, 1:02 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Your time is already encoded, don't think that's right - can you show the (host-obfuscated) full URL you are creating?

Be the first one to answer this question!


Register or 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.