wchavez | 2019-10-30 20:25:46 UTC | #1
Good afternoon:
A client has a definition of a web service exposed via REST HTTP. If we make a POST request, using POSTMAN, to the service, via HTTP, it responds 200 OK with the message details correctly.
But we need to configure a WebService Data Action in PureCloud and it works only for HTTPS REST Web Backend Services. So we configured an AWS API Gateway as a reverse proxy in passthrough mode, in order to make the POST request to this API Gateway that exposes the service contract via HTTPS, and then it redirects this request to the HTTP endpoint, like a pass-through reverse proxy. We tested this API Gateway using POSTMAN and it worked.
But when we configured the Custom Web Service Data Action and we maked the request in the Test option in PureCloud, it responded 500 - Internal Server error with the following "errors" field:
"errors": [
{
"status": 307,
"code": "INTERNALSERVERERROR",
"message": "REST call for action execute failed. Message:Request to backend service failed. Response from web service: <?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
...
Do you have any ideas of what the issue is about? It can be related to the pass-through mode of our API-Gateway reverse proxy?
Thank you all.
Jason_Mathison | 2019-10-31 12:36:20 UTC | #2
Hi wchavez,
A 307 is a temporary redirect. Data Actions does not follow redirects, nor do we intend to add that feature. My knowledge of API Gateway is pretty limited, is it possible that it is configured to redirect to the web service, not proxy it?
This is a situation where Postman can trip you up because it's default is to silently follow redirects for you. A couple of ways you can see this are to either open up the console to see the actual traffic, or to go to file -> settings -> general -> disable "Automatically follow redirects"
--Jason
wchavez | 2019-10-31 15:38:56 UTC | #3
Thank you Jason:
It is like you said. Now our client is setting the service in order to satisfy the PureCloud requierements. It was the decision they made.
And yes, in Postman works because of the reason you explained.
Appreciate your suggestions and clarifications.
Thanks.
system | 2019-12-12 10:11:23 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 6379