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

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

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

0 votes

Comments

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

I am using Basic authentication and below are the headers.

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.

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 ?

Consider opening a case with support. 

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

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

0 votes

Comments
Thanks a lot Barnard :) This works well. i am able to fetch all modules in the component.

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

Question asked: Apr 17 '23, 11:08 a.m.

Question was seen: 496 times

Last updated: Apr 19 '23, 3:58 a.m.

Confirmation Cancel Confirm