It's all about the answers!

Ask a question

[closed] Error: For input string: "http://jazz.net/ns/rm#Module"


Manju Gowda (37110) | asked Apr 17 '23, 11:08 a.m.
closed Apr 19 '23, 3:58 a.m. by David Honey (1.8k17)
Hi All,

I am using 702 SR1 iFix017.

I am using oslc query to get all the modules in the component.

Here is my Query URL:


output:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:err="http://jazz.net/xmlns/prod/jazz/foundation/1.0/">
  <rdf:Description>
    <err:detailedMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">For input string: "http://jazz.net/ns/rm#Module"</err:detailedMessage>
    <err:errorMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Bad Request</err:errorMessage>
    <err:errorStatus rdf:datatype="http://www.w3.org/2001/XMLSchema#long">400</err:errorStatus>
  </rdf:Description>
</rdf:RDF>

This query giving 400: Bad request. The same query was working earlier in 606 version.

Please let me know if am doing something wrong in the query.

Thanks in advance.
Manju


Comments
Michael Rowe commented Apr 17 '23, 11:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR

Please include headers in your post, what authentication method are you using? 


Manju Gowda commented Apr 17 '23, 11:59 a.m.
I am using Basic authentication and below are the headers.


David Honey commented Apr 17 '23, 1:46 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Not all the request parameters are correctly URL encoded. For example, for the oslc.where parameter, your usage shows a value in which < is not URL encoded but should be. The same error is evident in  many other parameters. Parameter values must be URL encoded - your request URL is not valid.


Manju Gowda commented Apr 18 '23, 2:30 a.m.
After multiple checks, the Query URL works find in 7.0.2 SR1 iFix015.
Same URL not working for iFix017 and iFix021.
Any reason for this ?

Ralph Schoon commented Apr 18 '23, 2:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Consider opening a case with support. 


Ralph Schoon commented Apr 18 '23, 3:07 a.m. | edited Apr 18 '23, 3:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note that just the URI is useless. The Method, the additional headers sent e.g. content type would be essential, also "Does not work"  is a quite useless statement. What does that mean?

showing 5 of 7 show 2 more comments

The question has been closed for the following reason: "The question is answered, right answer was accepted" by davidhoney Apr 19 '23, 3:58 a.m.

Accepted answer


permanent link
Ian Barnard (1.9k613) | answered Apr 18 '23, 4:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 18 '23, 5:08 a.m.

I don't know why this changed in iFix017 but rdm_types:ArtifactFormat is no longer exposed as a property for OSLC Query although it used to work before 017. Instead the rdf:type property can be tested - AFAICT this also works for 7.0.2 ifixes prior to 017.


So your query:


has to be changed to:

  • oslc.where=rdf:type=jazz_rm:Module

and prefix jazz_rm is http://jazz.net/ns/rm#

This could also be expressed without a prefix on the RHS as:

Manju Gowda selected this answer as the correct answer

Comments
Manju Gowda commented Apr 19 '23, 12:36 a.m.
Thanks a lot Barnard :) This works well. i am able to fetch all modules in the component.