cancel
Showing results for 
Search instead for 
Did you mean: 

CPI HTTP Receiver always returns 400 “Syntax Error” although same JSON works in Postman

11-25-2025 4:51 PM
Johannes_Zillmann Discoverer
1818 views 4 comments
0 Likes
Subscribe

Hi Everyone,

We are trying to call a BZSt REST endpoint from SAP Cloud Integration (CPI) using the HTTP Receiver adapter. The goal is to send a small JSON request from our SAP backend to the German EVATR service and receive a validation response.

The same request (same URL, same JSON body, same token/parameters) works perfectly in Postman. In CPI, however, we consistently receive an HTTP 400 error from the target system.

The error message in the CPI log is:

org.apache.camel.component.ahc.AhcOperationFailedException:
HTTP operation failed invoking https://api.evatr.vies.bzst.de/app/v1/abfrage with statusCode: 400

 The response body from the server is an HTML error page:

<html>
<head>
<base href="/error_path/">
<title>400 Bad Request</title>
</head>
<body>
<h1>Bad Request</h1>
<p>The server detected a syntax error in your request.<br>
Check your request and all parameters.</p>

<p>Your request ID was: aSW1_biQek9iXbaem_MTxwAABZY</p>
</body>
</html>

In the meantime, we have tested quite a lot of variations. We tried many different header combinations, including explicitly setting headers like Content-Type, Accept, Host, and Content-Length, and we experimented with the “Allowed / Request Headers” setting of the HTTP Receiver adapter (including using *). None of these attempts changed the behavior – CPI still only seems to forward a very small set of headers, and additional headers set via a Content Modifier often do not appear in the actual outbound call (according to the HTTP_Receiver_Adapter_Request_Headers attachment).

We also experimented with the payload itself: different JSON formats, slightly modified test payloads, sending the exact same body as Postman, and even building a minimal iFlow where the JSON body is hard-coded in a Content Modifier and sent directly to the HTTP receiver. The result is always the same 400 response from the BZSt service, so it does not appear to be a simple syntax issue in the JSON itself.

What could be the reason for this behavior, and does anyone know how to resolve it or what else we should check?

Here is how the iFlow is built and the error messages:
Content_Modifer_Header.pngContent_Modifier_Body.pngHTTP_Receiver_Adapter_Request_Headers.pngHTTP_Reciever_Adapter.pngIFlow.pngIsolated_Test_IFlow.pngTrace_Payload.png

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

davidschievers
Participant

Hi, we have had the same issue. SAP mentioned after we opened a ticket to try the following thing: Remove the SAP-PASSPORT header

We achieved this by doing the following steps:

In order to remove the SAP-PASSPORT, add a * modifier right before the step making the call to the target system and:

1) set property "SAP_DisablePassportTransmission" to "true"
2) remove header "SAP-PASSPORT"

Regards
David

 

gajjarb
Newcomer
0 Likes
Hi Johannes,Were you able to fix this ? Would you help how to implement this and some steps?
Johannes_Zillmann
Discoverer
0 Likes
We solved it using a Groovy script in CPI and handled the web service call programmatically instead of using the approach discussed here.
danmllr
Explorer
0 Likes
Thanks, that’s exactly what I was looking for. It works perfectly! For reference, I configured it in the Content Modifier as follows: 1. Message Header -> Action: Delete, Name: SAP-PASSPORT 2. Exchange Property -> Action: Create, Name: SAP_DisablePassportTransmission, Source Value: true