Hello ,
I am trying to connect to a rest web service through below code . I am using OpenEdge 7.1 .
oClient = ClientBuilder:Build():KeepCookies():Client. /*CookiesJarBuilder:Build():CookieJar*/
oURI = NEW URI('https', 'hostname', port).
oURI:Path = '/api/sample/uri'.
oRequest = RequestBuilder:Build('POST', oURI):AddHeader("Content-Type","application/json")
:acceptJson()
:Request.
oResponse = ResponseBuilder:Build():Response.
oResponse = ClientBuilder:Build():Client:Execute(oRequest).
When i execute the code , i get below two errors .
Error 1 :
Secure Socket layer faliure . error code -54: self signed certificate chain: for xyzcertificate in c:\Progress\OpenEdge\certs(9318) .
Error 2:
Secure Socket layer (SSL) failure . error code 10060: Unknown network error (9318) .
Could anybody please suggest
Thanks!
|
||||
Brian Maher
|
||||
Principal Engineer, Technical Support
|
||||
Progress
|
||||
14 Oak Park | Bedford, MA 01730 | USA
|
||||
|
||||
|
Mitesh, this might help you:
I am still not able to connect to the web service .
I have added -nohostverify , re installed all the certificates but it still does not work . To identify the issue . I am now just trying to connect to the server using connect statement as shown below in the code and i am getting error
"Secure Socket layer(SSL) failure, error code 10061 : unknown network error (9318)"
/*********** Below code which i am running to ***************/
DEFINE VARIABLE vcWebResp AS CHARACTER NO-UNDO.
DEFINE VARIABLE lSucess AS LOGICAL NO-UNDO.
DEFINE VARIABLE mResponse AS MEMPTR NO-UNDO.
DEFINE VARIABLE mRequest AS MEMPTR.
DEFINE VARIABLE postUrl AS CHAR.
DEFINE VARIABLE vcRequest as char format "x(100)" no-undo.
DEFINE VARIABLE postData as char format "x(100)" no-undo.
DEFINE VARIABLE vhSocket AS HANDLE NO-UNDO.
CREATE SOCKET vhSocket.
/**********Using Windows API****************/
PROCEDURE Sleep EXTERNAL "KERNEL32.DLL":
DEFINE INPUT PARAMETER intMilliseconds AS LONG.
END PROCEDURE.
vhSocket:CONNECT("-h hostname -S 1234 -ssl -nohostverify") NO-ERROR.
IF vhSocket:CONNECTED() = FALSE THEN
do:
message "Error".
MESSAGE ERROR-STATUS:GET-MESSAGE(1) VIEW-AS ALERT-BOX.
end.
else
message "Connected".
pause.
|
||||
Brian Maher
|
||||
Principal Engineer, Technical Support
|
||||
Progress
|
||||
14 Oak Park | Bedford, MA 01730 | USA
|
||||
|
||||
|
host name is cs3.gtreasurycs.com , i was not providing the hostname and port number as that information might be sensitive .
I recommend that you first search our knowledgebase. You can do it with google as follows:
site:progress.com your search string goes here, the full text of the error is a good starting point
Searching for "Secure Socket layer(SSL) failure, error code 10061 : unknown network error (9318)" returned this...
knowledgebase.progress.com/.../000031248
Check with your IT folks and see if they require the use of a proxy for internet bound requests. I would expect so.