Hello,
In sap cloud platform, under workflow application I am using service task as a last step to create entity on on-premise system. For that I have Odata service created on on-premise system. When I am calling it through service task I am getting below error
Service endpoint:XXX
Error message:The XSRF token request to URL 'https://XXX.XXX/sap/opu/odata/sap/ZF_UPD_CPTASK_SRV?$format=json' failed with HTTP status code 405 (Method Not Allowed) and response body 'HTTPS proxying is not supported. Use HTTP instead. HTTPS is not needed because communication is already secured by the tunnel. '
The Type of Destination is http and the url of destination is https.


Kindly help. Please let me know if any other inputs needed.
Regards,
Neha
Request clarification before answering.
Hello Neha and Karimulla,
As mentioned in my comments, workflow only support application/json based Conten-Type in Service Task. If your API returns any other format then either use ?$format=json and if that is not supported then you cannot use Service Task in workflow. You can either use Cloud Integration or make. such calls in SAPUI5 components.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Archana for replying.
When I call the URI in the browser then it goes for an additional authentication (login to the backend system), manually once I login to the system then the result json is returned.
Since in service task we cannot login to the backend by manual intervention hence the return is HTML which is of the login page.
I assume my service is working but the whole issue is because of this additional login page.
Kindly help.Please let me know if any other inputs needed.
Thanks,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neha,
Have you got the solution for below error.
The 'Content-Type' header of the HTTP response contained the value 'text/html' not a 'application/json' as expected.
i am also facing same issue while consuming Odata at cloud workflow service task.
if you find the solution , please provide the inputs.
This error comes because Workflow only support services which have application/json based content-type output but in your case it is returning text/html. Can you run this URL in your browser and see the output header type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Archana for replying.
When I call the URI in the browser then it goes for an additional authentication (login to the backend system), manually once I login to the system then the result json is returned.
Since in service task we cannot login to the backend by manual intervention hence the return is HTML which is of the login page.
I assume my service is working but the whole issue is because of this additional login page.
Kindly help.Please let me know if any other inputs needed.
Thanks,
Neha
Hi Tobias and Archana ,
Thanks for the help.
I Have created destination with virtual http url. Now the above error is resolved. But I have additional authentication for backend system. I am getting below error now.
Error message: The 'Content-Type' header of the HTTP response contained the value 'text/html' not a 'application/json' as expected.


Any idea how to resolve this issue?
Thanks,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This comes when when you have used https in the URL while configuring your destination. Please change it to HTTP as your call is anyways secured via the cloud connector.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the help.
I Have created destination with virtual http url. Now the above error is resolved. But I have additional authentication for backend system. I am getting below error now.
Error message: The 'Content-Type' header of the HTTP response contained the value 'text/html' not a 'application/json' as expected.
Any idea how to resolve this issue?
Thanks,
Neha
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.