Querying for defect using RTC returns 406
Hello,
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&oslc_cm.properties=dc:identifier
Error: Method failed: HTTP/1.1 406 Not Acceptable
Anybody has seen this before? How do I resolve this.
Thanks,
Alain
3 answers
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
Hello,
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 : //
https :// <machine>:9443/jazz/oslc/contexts/_37OIAGEUEeCVht4GfixAjw/workitems?_mediaType=application/x-oslc-cm-change-request%2Bjson&oslc_cm.query=dc:type=%22defect%22&oslc_cm.properties=dc:identifier
(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&oslc_cm.properties=dc:identifier
(removed the header)
Comments
Don,
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.
Thanks,
Alain
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?
Then 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.