on 08-09-2018 4:52 PM
Hi SAP Guru's
We have developed a workflow in SAP cloud workflow.
But our SAP backend System does not see the post request as a Json format. But as a XML format. To solve this we have to add in the header "Content-Type: application/json".
Do you guys know how this is done in SAP cloud Platform workflow?
Ps, Yes I did try to put ?$format=json
Hi,
CP Workflow currently does not support anything else than JSON in service tasks and we do set all the headers that are usually required for that, such as the "Content-Type: application/json" and the corresponding Accept header for the JSON-format response that we expect. So you do not need to set these headers and there is currently no possibility to overwrite them anyway.
In our logs, I do not see the $format=json for calls to your company server, so maybe the respective destination configuration change did not work out?
The error message that's coming back from your server is a rather generic ABAP XML error message, so maybe some logs on the ABAP side could tell you more on what it is struggling with.
Regards,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitin,
The only case, when we do not set a JSON Accept header is when the response variable is NOT configured, i.e. when it seems you are not interested in a storing the result. It seems our HTTP client library in such cases sets the */* value that you see for the Accept header, which corresponds to "I accept anything you send me".
So maybe check the settings at the respective service tasks. Perhaps you did not configure a response context reference.
Best regards,
Tobias
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.