Question WebService Call TimeOut

atuldalvi

Member
I am facing one webservice call issue like I am calling webservice designed in .net but sometime that webservice is taking long time to execute.
Is there any possiblity to break that webservice call by giving time duration like 1 min.
 

TheMadDBA

Active Member
:) Most likely not.... it all depends on your definition of "break" and how the backend code for the webservice is written. If it is read only then probably not. If it updates data in one transaction... probably not.

You could find out why it is taking so long though.
 

KrisM

Member
Code:
do stop-after 60 on stop undo, return:
    <your code>
end.

I thought the stop-after option is intended to provide this ?
(Throw a stop condition after 60 seconds)
 

jongpau

Member
Have you investigated the option of doing the web service call asynchronously (using the ASYNCHRONOUS option)? This would allow your code to keep running and do other things while the web services goes about it's business. You then process the response when the web service call has finished.
 

atuldalvi

Member
Thanks Krism.

Use the STOP-AFTER phrase that was introduced in OpenEdge 10.2B to interrupt the Web Service request. For example the following sample code will interrupt the Web Service request if the SOAP Response takes more than 5 seconds to complete:

/***********************/
MyBlock:
DO STOP-AFTER 5 ON STOP UNDO, RETRY :
IF RETRY THEN DO:
LEAVE MyBlock.
END.
RUN Roundtrip IN hWSTestObj(INPUT ipcText, INPUT ipiNum, OUTPUT res, OUTPUT opcText, OUTPUT opiNum).
END.
/***********************/
 
Top