We interface with a 3rd party software provider using restful http services (json body). We implemented HTTPAPI to handle the restful calls with yajl to generate and parse json. For the most part, this works perfectly. However, we are encountering a lot of issues where the http_req will time out after "so many seconds" but the 3rd party service provider claims they sent a response back. Here is a scenario:
globalTimeout = 330;
returnCode = http_setOption('timeout':%char(globalTimeout));
httpApireturnCode = http_req( 'POST'
: serviceUrl
: *omit
: globalJsonResponse
: *omit
: globalJsonRequest
: 'application/json' );
httpStatusMsg = http_error(httpApiErrorCode:httpStatus);
if httpStatusMsg = HTTP_TIMEOUT_MSG;
// log timeout message in local log file
endif;
The 3rd party service provider showed us their logs for a specific request and their logs "seem" to show that they responded in 60 seconds with an http status of 200 with a proper json body response. I could post their log but it contains a lot of confidential information that would need to be stripped out before I could post it. I'll be happy to do so if anyone needs to see it. Here is the HTTPAPI log (ignoring the initial portion of the log showing ssl etc):
POST /restful/services/path/service1 HTTP/1.1
Host: thirdparty.restfulservices.com:443
User-Agent: http-api/1.34
Content-Type: application/json
Content-Length: 187
Authorization: XYz123
senddoc(): entered{"field":"value"}
recvresp(): entered
etError() #43: CommSSL_Read: timeout!
recvresp(): end with timeout
http_close(): entered
Any clues on how to troubleshoot this with the 3rd party service provider?
Raymond K