Trouble with batch requests (DELETE not working)

958 views Asked by At

We're using SAP Cloud SDK 3.32.0 and are using batch requests. Sending changes (updates of existing entities) work fine. However, DELETE of entity(set) fails. We get a message back from the SAP Gateway, saying the OData batch request is malformed. Even with a single delete in the changeset, this is the case.

After some debugging and digging (tracing on the SAP gateway), we found that the gateway apparently expects 2 empty lines after each change in a changeset (according to https://blogs.sap.com/2018/05/06/batch-request-in-sap-gateway/). But when we inspect the call to the SAP Gateway, we see that there is only 1 blank line.

--batch_8f792254-f381-4d9f-9667-850cd1d33548
content-type: multipart/mixed;boundary=changeset_38bd1293-04f2-497e-af7e-4bacb0787023

--changeset_38bd1293-04f2-497e-af7e-4bacb0787023
content-type: application/http
content-transfer-encoding: binary
content-id: 1

DELETE DienstSet(IndelingsNummer='1',RegelNummer='0000000010',Operatie='0390',OrderID='4108563') HTTP/1.1
Accept: application/json

--changeset_38bd1293-04f2-497e-af7e-4bacb0787023--

--batch_8f792254-f381-4d9f-9667-850cd1d33548--

When we add an extra blank line in the request, just before the last --changset...-- line and use this in the SAP gateway client, the call gets executed OK.

So, this seems to be a bug in the SAP Cloud SDK. It somehow does not generate "batch" compliant HTTP requests.

This is a major issue for us and we need this to be fixed quite soon. Any hotfix for this?

Thanks,

Danny

1

There are 1 answers

1
Alexander Dümont On

The issue was fixed in recently released SAP Cloud SDK version 3.34.1.

Please update the dependency/ies in your project and let us know if it works for you.