You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by RATISH BANSAL <ra...@gmail.com> on 2019/02/26 10:40:09 UTC

[Olingo 4.5 Java client] [Batch Request] [ Request Chunking Configuration] Failed to retrieve payloadMager from batch request if OdataClient client configuration has set chunking to false i.e setUseChuncked(false)

Hello Group,

We have a use case where we want to create a batch request with change set
containing list of request to be executed. Below is the sample code for the
same:

*BatchRequestFactory batchRequestFactory = client.getBatchRequestFactory();*
*ODataBatchRequest batchRequest =
batchRequestFactory.getBatchRequest(<serviceRoot>);*
*BatchManager payloadManager = batchRequest.payloadManager(); /// Fails to
get payloadManager here with "While reading input for not chunked encoding"
exception*
*ODataChangeset changeSet = payloadManager.addChangeset();*

*// Add all the requests present in the list using loop*
*changeSet.addRequest(batchableRequest);*

The issue we are facing is that we fail retrieve the payloadManager from
batch request if we set the client configuration with "chunking=false" i.e
*client.getConfiguration().setUseChuncked(false);*
But it works fine if we set it to true i.e
client.getConfiguration().setUseChuncked(true).

Is this the expected behavior? Shouldn't this work with configuration of
setUseChuncked(false) as well?

Thanks & Regards
Ratish Bansal