Hi All,
We built system that works against some Web Service.
Generally everything works nice, but there is an issue.
If an endpoint is set wrong in our configuration, the first time we try to connect to a server
it throws back, with messages of connectivity issue.
If we try it again, once it comes to
hWebService:CONNECT(wsdlPath)
progress just stops, and it takes ages to come back.
Does anybody have an idea what happens?
CLASS CBWSConnector:
DEF VAR hServiceSoap AS HANDLE NO-UNDO.
DEF VAR hWebService AS HANDLE NO-UNDO.
CONSTRUCTOR PUBLIC CBWSConnector (INPUT portName AS CHARACTER, INPUT wsdlAddress AS CHARACTER):
DEF VAR wsdlPath AS CHAR INIT "-WSDL" NO-UNDO.
ASSIGN wsdlPath = wsdlPath + " " + wsdlAddress.
CREATE SERVER hWebService.
hWebService:CONNECT(wsdlPath).
RUN VALUE(portName) SET hServiceSoap ON hWebService.
END CONSTRUCTOR.
METHOD PUBLIC VOID DisconnectWS().
hWebServiceISCONNECT() NO-ERROR.
DELETE OBJECT hWebService NO-ERROR.
END METHOD.
........MORE METHODS.................
END CLASS.
I use the Disconnect method to explicitly disconnect the server upon completion.
METHOD PUBLIC CHARACTER AuthenticateUser(uname AS CHARACTER, password AS CHARACTER).
DEFINE VARIABLE auth AS CHARACTER NO-UNDO.
DEFINE VARIABLE Conn AS CBWSConnector NO-UNDO.
Conn = New CBWSConnector(CBWSConnector:userServicePortName, userManagementServiceWSDLLink).
ASSIGN
auth = Conn:AuthenticateUser_WS(uname,password).
ConnisconnectWS() NO-ERROR.
DELETE OBJECT Conn NO-ERROR.
RETURN auth.
END METHOD.
Thank You!
We built system that works against some Web Service.
Generally everything works nice, but there is an issue.
If an endpoint is set wrong in our configuration, the first time we try to connect to a server
it throws back, with messages of connectivity issue.
If we try it again, once it comes to
hWebService:CONNECT(wsdlPath)
progress just stops, and it takes ages to come back.
Does anybody have an idea what happens?
CLASS CBWSConnector:
DEF VAR hServiceSoap AS HANDLE NO-UNDO.
DEF VAR hWebService AS HANDLE NO-UNDO.
CONSTRUCTOR PUBLIC CBWSConnector (INPUT portName AS CHARACTER, INPUT wsdlAddress AS CHARACTER):
DEF VAR wsdlPath AS CHAR INIT "-WSDL" NO-UNDO.
ASSIGN wsdlPath = wsdlPath + " " + wsdlAddress.
CREATE SERVER hWebService.
hWebService:CONNECT(wsdlPath).
RUN VALUE(portName) SET hServiceSoap ON hWebService.
END CONSTRUCTOR.
METHOD PUBLIC VOID DisconnectWS().
hWebServiceISCONNECT() NO-ERROR.
DELETE OBJECT hWebService NO-ERROR.
END METHOD.
........MORE METHODS.................
END CLASS.
I use the Disconnect method to explicitly disconnect the server upon completion.
METHOD PUBLIC CHARACTER AuthenticateUser(uname AS CHARACTER, password AS CHARACTER).
DEFINE VARIABLE auth AS CHARACTER NO-UNDO.
DEFINE VARIABLE Conn AS CBWSConnector NO-UNDO.
Conn = New CBWSConnector(CBWSConnector:userServicePortName, userManagementServiceWSDLLink).
ASSIGN
auth = Conn:AuthenticateUser_WS(uname,password).
ConnisconnectWS() NO-ERROR.
DELETE OBJECT Conn NO-ERROR.
RETURN auth.
END METHOD.
Thank You!