mimi_mircea
New Member
Hi
I am trying to connect to a webservice with ssl, using a client certificate.
the code is as follows:
DEFINE VARIABLE hWebService AS HANDLE.
CREATE SERVER hWebService.
hWebService:CONNECT("-WSDL 'https://site.com/nr.WebService/file.asmx?WSDL' ") NO-ERROR.
IF NOT hWebService:CONNECTED() THEN
DO:
DEFINE VARIABLE errmsg AS CHARACTER NO-UNDO INIT "SERVER NOT CONNECTED~n".
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 TO ERROR-STATUS:NUM-MESSAGES:
errmsg = errmsg + ERROR-STATUS:GET-MESSAGE(i) + '~n'.
END.
MESSAGE errmsg VIEW-AS ALERT-BOX ERROR.
STOP.
END.
MESSAGE 'connected' VIEW-AS ALERT-BOX.
/*RUN TemperaturePortType SET hPortType ON SERVER hWebService NO-ERROR.*/
RUN servMethod ON SERVER hWebService () NO-ERROR.
IF ERROR-STATUS:ERROR THEN
MESSAGE 'Error: ' + ERROR-STATUS:GET-MESSAGE(1) VIEW-AS ALERT-BOX.
ELSE
MESSAGE 'Result: ' + RETURN-VALUE VIEW-AS ALERT-BOX.
/*MESSAGE "Failed to create hPortType" VIEW-AS ALERT-BOX. */
/**********************/
/*WAIT-FOR CLOSE OF CURRENT-WINDOW.*/
/*DELETE PROCEDURE hPortType.*/
hWebServiceISCONNECT().
DELETE OBJECT hWebService.
ok... the problem isn't with the code... but with some kind of bizare configuration... because when i try to run this code (in OpenEdge 10.1B) i get the following error message:
Server Not Connected
Secure Socket Layer failure. error code - 54: unable to get local issuer certificate: for 80abdb33.0 in c:\progress\openedge\certs... bla bla
the thing is that i imported my certificate into \certs with certutil - import mycertificate.pem... and i've got a number like 5e8f339e ... and the file is 5e8f339e.0 in \certs
but how to tell progress to compile my program using that certificate and not 80abdb33.0
I've searched everywhere... please help!!!!!
I am trying to connect to a webservice with ssl, using a client certificate.
the code is as follows:
DEFINE VARIABLE hWebService AS HANDLE.
CREATE SERVER hWebService.
hWebService:CONNECT("-WSDL 'https://site.com/nr.WebService/file.asmx?WSDL' ") NO-ERROR.
IF NOT hWebService:CONNECTED() THEN
DO:
DEFINE VARIABLE errmsg AS CHARACTER NO-UNDO INIT "SERVER NOT CONNECTED~n".
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 TO ERROR-STATUS:NUM-MESSAGES:
errmsg = errmsg + ERROR-STATUS:GET-MESSAGE(i) + '~n'.
END.
MESSAGE errmsg VIEW-AS ALERT-BOX ERROR.
STOP.
END.
MESSAGE 'connected' VIEW-AS ALERT-BOX.
/*RUN TemperaturePortType SET hPortType ON SERVER hWebService NO-ERROR.*/
RUN servMethod ON SERVER hWebService () NO-ERROR.
IF ERROR-STATUS:ERROR THEN
MESSAGE 'Error: ' + ERROR-STATUS:GET-MESSAGE(1) VIEW-AS ALERT-BOX.
ELSE
MESSAGE 'Result: ' + RETURN-VALUE VIEW-AS ALERT-BOX.
/*MESSAGE "Failed to create hPortType" VIEW-AS ALERT-BOX. */
/**********************/
/*WAIT-FOR CLOSE OF CURRENT-WINDOW.*/
/*DELETE PROCEDURE hPortType.*/
hWebServiceISCONNECT().
DELETE OBJECT hWebService.
ok... the problem isn't with the code... but with some kind of bizare configuration... because when i try to run this code (in OpenEdge 10.1B) i get the following error message:
Server Not Connected
Secure Socket Layer failure. error code - 54: unable to get local issuer certificate: for 80abdb33.0 in c:\progress\openedge\certs... bla bla
the thing is that i imported my certificate into \certs with certutil - import mycertificate.pem... and i've got a number like 5e8f339e ... and the file is 5e8f339e.0 in \certs
but how to tell progress to compile my program using that certificate and not 80abdb33.0
I've searched everywhere... please help!!!!!