Hi all,
I'm trying to call a ws asynchronously, unfortunately it does not trigger.
Here is the snippet:
If I do a standard request, it eats some time so I decided to make an ASYNCHRONOUS call which is much faster, and also I'm not interested to wait for a response from the other system.
Standard call works, but if i'm doing it asynchronously it does not trigger the other system.
Do I have a wrong syntax, did anyone worked with asynchronous ws, as calls?
Thanks in advance.
I'm trying to call a ws asynchronously, unfortunately it does not trigger.
Here is the snippet:
Code:
CREATE SERVER hWebService.
/* connect to webservice */
lStatus = hWebService:CONNECT("-WSDL '" + evcli.urn + "'") NO-ERROR.
/* web service connected, send message */
IF lStatus THEN
DO: /* <portType name="consumerObj"> */
RUN VALUE(evcli.portType) SET hconsumerObj ON hWebService NO-ERROR.
/* reset error-status */
ERROR-STATUS:ERROR = NO.
ASSIGN iRetryCount = 0.
REPEAT:
/* run procedure and send the XML message */
RUN VALUE(evcli.operation) IN hconsumerObj ASYNCHRONOUS (INPUT ipcTableName) NO-ERROR.
IF ERROR-STATUS:ERROR THEN
iRetryCount = iRetryCount + 1.
ELSE
LEAVE.
IF iRetryCount > 2 THEN
LEAVE.
END.
IF iRetryCount > 2 THEN DO:
{debug.i "ERROR-STATUS:GET-MESSAGE(1)"}
END.
hWebService:DISCONNECT(). /* session ended */
DELETE OBJECT hconsumerObj NO-ERROR.
END.
ELSE DO:
{debug.i "'Web service not available!'"}
END.
DELETE OBJECT hWebService NO-ERROR.
If I do a standard request, it eats some time so I decided to make an ASYNCHRONOUS call which is much faster, and also I'm not interested to wait for a response from the other system.
Standard call works, but if i'm doing it asynchronously it does not trigger the other system.
Do I have a wrong syntax, did anyone worked with asynchronous ws, as calls?
Thanks in advance.