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

[closed] Error: (406) Not Acceptable when fetching workitem info via OSLC

 I'm writing a Java application to fetch the list of all workitems (Id and Title) for a given Project Area via OSLC.


These are the detailed steps I did (in java application): 
-    Send HTTP GET Request for https://<server>:9443/ccm/rootservices 
      - no authentication is required 
      - returns response with XML stream 
-    Parse the response XML stream 
      - Using the xpath (/rdf:Description/oslc_cm:cmServiceProviders/@rdf:resource) 
      - Extract all cmServiceProviders catalogs 
            => returns https://<server>:9443/ccm/oslc/workitems/catalog 
-    Send HTTP GET Request for https://<server>:9443/ccm/oslc/workitems/catalog 
      - response: authRequired 
      - post authentication form with login credentials 
            => authentication successful 
      - Send HTTP GET Request for https://<server>:9443/ccm/oslc/workitems/catalog once again 
            => returns response with XML stream 
-    Parse the response XML stream 
      - Using the xpath (//oslc:ServiceProvider) 
      - Extract my Project area and its corresponding services link 
           => returns https://<server>:9443/ccm/oslc/contexts/<ID>/workitems/services.xml for my project area 
-    Send HTTP GET Request for https://<server>:9443/ccm/oslc/contexts/<ID>/workitems/services.xml 
      - response: authRequired 
      - post authentication form with login credentials 
          => authentication successful 
      - Send HTTP GET Request for https://<server>:9443/ccm/oslc/contexts/<ID>/workitems/services.xml again 
      - post authentication form with login credentials 
  we are getting this error
            => HTTP/1.1 406 Not Acceptable [X-Powered-By: Servlet/3.0, x-com-ibm-team-scenario: 10.118.58.5, Cache-Control: private, max-age=0, must-revalidate, Expires: Fri, 02 Aug 2019 09:45:20 GMT, Content-Language: en-IN, Content-Length: 0, Connection: Close, Date: Fri, 02 Aug 2019 09:45:21 GMT]
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Why there is an “Error: (406) Not Acceptable” from the server at the last  step ??
My internet searches told me to look into my request’s accept header to look for any incompatible data with the server. But It is not clear to me what is going wrong with the accept header ? 




Also, the same authentication has worked for the previous GET requests like:

https://<server>:9443/ccm/oslc/workitems/catalog

https://<server>:9443/ccm/oslc/contexts/<ID>/workitems/services.xml

Then, why the same authentication fails for the GET request for:

https://<server>:9443/ccm/oslc/contexts/<ID>/workitems

Could you please help ?

0 votes


The question has been closed for the following reason: "Duplicate Question" by rschoon Aug 02 '19, 6:11 a.m.


One answer

Permanent link

 I would strongly suggest you and your colleague coordinate forum questions.

0 votes

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

Question asked: Aug 02 '19, 6:07 a.m.

Question was seen: 1,888 times

Last updated: Aug 02 '19, 6:11 a.m.

Confirmation Cancel Confirm