cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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

0 Likes

Accepted Solutions (0)

Answers (5)

Answers (5)

Archana
Product and Topic Expert
Product and Topic Expert

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.

parab_neha
Explorer
0 Likes

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

0 Likes

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.

parab_neha
Explorer
0 Likes

Hi ,

No, I did not find solution for this error so far. I used workaround for my scenario .

Instead of using service task, I am calling my service through SAPUI5 component of user task.

Regards,

Neha

ppoeckel89
Discoverer
0 Likes

Any solution here for the Login Porblem? archana.shukla

Archana
Product and Topic Expert
Product and Topic Expert
0 Likes

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.

parab_neha
Explorer
0 Likes

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

parab_neha
Explorer
0 Likes

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

Archana
Product and Topic Expert
Product and Topic Expert
0 Likes

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.

parab_neha
Explorer
0 Likes

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