It's all about the answers!

Ask a question

Querying for defect using RTC returns 406

Alain robert (1156) | asked Apr 18 '13, 12:23 a.m.
edited Apr 18 '13, 9:12 a.m.


I run this query to find all the defects in a current project and I receive an http error 406 The server is RTC4.0.0.1

https :// <machine>:9443/jazz/oslc/contexts/_37OIAGEUEeCVht4GfixAjw/workitems?_mediaType=" query=dc:type=%22defect%22&

Error: Method failed: HTTP/1.1 406 Not Acceptable

Anybody has seen this before? How do I resolve this.



3 answers

permanent link
Krzysztof Ka┼║mierczyk (7.5k477103) | answered Apr 18 '13, 3:20 a.m.
Hello Alain.
Do you have proxy server between your RTC client and server? If yes, then the most probable root cause is that your IHS (or another proxy server) returns 406 on http request from web browser.
You need to reconfigure proxy server to disable returning 406 errors.

Let me know if it helped for you.

Best regards,
Krzysztof Kazmierczyk

permanent link
Alain robert (1156) | answered Apr 18 '13, 9:00 a.m.
edited Apr 18 '13, 9:04 a.m.


I am not sure whether there is a proxy or not, is there a way to tell from the client?

I believe it is specific to this query though because I can run this one

https : // :9443/jazz/oslc/contexts/_37OIAGEUEeCVht4GfixAjw/workitems?_mediaType=application/x-oslc-cm-change-request%2Bjson&oslc_cm.query=rtc_cm:apar=%22*RS01111*%22&

permanent link
Don Yang (7.7k21110139) | answered Apr 19 '13, 12:58 a.m.
You can try the below to get a list of defect:

https :// <machine>:9443/jazz/oslc/contexts/_37OIAGEUEeCVht4GfixAjw/workitems?_mediaType=application/x-oslc-cm-change-request%2Bjson&oslc_cm.query=dc:type=%22defect%22&
(similar to what you did for query apar workitem)
or https :// <machine>:9443/jazz/oslc/contexts/_37OIAGEUEeCVht4GfixAjw/workitems?oslc_cm.query=dc:type=%22defect%22&
(removed the header)

Alain robert commented Apr 19 '13, 10:51 a.m.


Thank you for taking the time, I believe this is what I do. And I also run both with and without the _mediaType definition and they both return 406.

It seems that dc:type does not work here and I wonder if there is another way to query for that.



Don Yang commented Apr 20 '13, 12:44 a.m.

I have tested the above two query with 4.0.1 and it works for me in both browser(FF 10) and REST Client(with no header).Maybe you can try rtc_cm:type but I believe dc:type should work.
If you try: https :// <machine>:9443/jazz/oslc/contexts/_37OIAGEUEeCVht4GfixAjw/workitems/, does it work for you?
https :// <machine>:9443/jazz/oslc/contexts/_37OIAGEUEeCVht4GfixAjw/workitems?oslc_cm.query=dc:type=%22defect%22
and see if it works or not. In my test, they all work fine.

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.