It's all about the answers!

Ask a question

Getting URL invalid error when trying to GET a Query in JAVA


Sanitha Pillai (61810) | asked Feb 22 '13, 4:01 a.m.
retagged Feb 22 '13, 12:42 p.m. by Michelle De Armas (2612)

When i try to access the belwo query from Poster to retrive the folder of the artifact i get the expected result but when i try to do the same programmatically , i am getting invalid URL error :-

Query :-
  String queryParam3 = "&oslc.prefix="
    + URLEncoder.encode("dcterms=<http://purl.org/dc/terms/>",
      "UTF8")
    + ","
    + URLEncoder.encode("oslc=<http://open-services.net/ns/core#>",
      "UTF8")
    + ","
    + URLEncoder.encode("nav=<http://com.ibm.rdm/navigation#>",
      "UTF8")
    + ","
    + URLEncoder.encode("rrmNav=<http://com.ibm.rdm/navigation#>",
      "UTF8")
    + "&oslc.select=" + URLEncoder.encode("dcterms:title", "UTF8") +

    "&oslc.where=" + URLEncoder.encode("dcterms:title=", "UTF8")
    + "%22" + URLEncoder.encode(deliverableType, "UTF8") + "%22"
    + "&oslc.where=" + URLEncoder.encode("nav:parent=<", "UTF8")
    + URLEncoder.encode(templateFolderServiceURI, "UTF8") + ">";

Getting error while executing the above query.Maybe the issue is with the two oslc:where condition used.

One answer



permanent link
Gabriel Ruelas (1.1k13) | answered Feb 22 '13, 4:07 p.m.
Hi,

I just tested the query provided and it works fine. Remember that title must fully match the title of the artifacts ( title does not support partial search ). I would suggest trying to change title for a different condition and test.

Your answer


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.