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

getting status code 500 when sending request using java code.

query1=https://jazzserver.com/rm/types/_Gjv3oPRDEeKh39QdzLt5FQ#_23fa87eb-66d5-4705-b6ad-ba3346aabd96

If I use the above url , I get  a status code 500. I am using the following as the header

here's the code snippet:

HttpGet actionQuery = new HttpGet(query1);
   System.out.println("actionQuery "+actionQuery);
    actionQuery.addHeader("Accept", "application/xml");
   actionQuery.addHeader("OSLC-Core-Version", "2.0");
   HttpResponse response = HttpUtils.sendGetForSecureDocument(server, actionQuery, login, password, httpclient,jtsServer);

I tried url encoding but that does not seem to work.

If I use firefox RESTClient it gives me the expected response 

0 votes

Comments

any error in the log?



One answer

Permanent link
Hi,
Could you try changing :
actionQuery.addHeader("Accept", "application/xml");
for :
actionQuery.addHeader("Accept", "application/rdf+xml");

0 votes

Comments

Hi Gabriel,

Tried this as well.It still does not work.

Thanks

Lipi

Your answer

Register or log in 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.

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 19 '13, 8:31 a.m.

Question was seen: 3,302 times

Last updated: Aug 19 '13, 11:04 a.m.

Related questions
Confirmation Cancel Confirm