kritisha created OLINGO-1240:
--------------------------------
Summary: Error in sending requests in Batch-
InternalServerError","message":"Invalid JSON"
Key: OLINGO-1240
URL: https://issues.apache.org/jira/browse/OLINGO-1240
Project: Olingo
Issue Type: Bug
Components: odata4-client
Affects Versions: (Java) V4 4.3.0
Reporter: kritisha
Attachments: batch request.saz, invalid json error message.txt
I have been using v4.3.0 for the olingo client libraries and currently using it
to test batch support in Odata v4. I am working without changesets in the batch
and the issue seems to be that if the last request in the batch seems to be a
post(http method with body) , the request fails with the error message -
{"error":{"code":"InternalServerError","message":"Invalid JSON. More than one
value was found at the root of the JSON content. JSON content can only have one
value at the root level, which is an array, an object or a primitive value."
I have tried the scenario with TripPin service
([http://services.odata.org/V4/TripPinService/] ) and also on the Microsoft
Dynamics v4 WEB api([https://msdn.microsoft.com/en-us/library/mt607719.aspx] )
In both the third parties, the batch request is expected to have an additional
new line character at the end for the last request in batch to succeed. The
issue has also been pointed out at the folllowing link-
[https://social.msdn.microsoft.com/Forums/sqlserver/en-US/293f8748-aec0-4093-867e-9b25d503313e/cannot-update-messages-through-rest-batch-request?forum=Office365forDevelopers]
Requiring a fix in the olingo-client-core api to be made to append newline in
the batch.I have locally made those changes in AbstractBatchManager class and
last request is working fine. PFA the fiddler session log for working and
failure scenarios and the error message.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)