我正在调用Web服务,通过LONGCHAR变量发送大型XML,该变量由Dataset使用方法WRITE-XML()填充。
在调用WS 1400次(70000行被50组破坏)后,Progress返回错误5486.经过一些Google研究,我发现this和this。似乎Progress不会释放内存或用于连接WS的端口。
通过这种方式进行通话:
DEF VAR hGenericWs AS HANDLE NO-UNDO.
DEF VAR hGenericPort AS HANDLE NO-UNDO.
DEF VAR cUrlWS AS CHAR NO-UNDO.
DEF VAR cHeaderMethod AS CHAR NO-UNDO.
DEF VAR cTransactionMethod AS CHAR NO-UNDO.
DEF VAR cNamespace AS CHAR NO-UNDO.
DEF VAR cPort AS CHAR NO-UNDO.
RUN getGenericWsHandles IN h-dbapi072(OUTPUT cPort,
OUTPUT cNamespace,
OUTPUT cTransactionMethod,
OUTPUT cHeaderMethod,
OUTPUT cUrlWs).
CREATE SERVER hGenericWs.
IF cUrlWs <> '' THEN
hGenericWs:CONNECT("-WSDL " + cUrlWs) NO-ERROR.
IF NOT hGenericWs:CONNECTED() THEN DO:
/*show message error*/
END.
ELSE
DO:
RUN value(cPort) SET hGenericPort ON hGenericWs NO-ERROR.
end.
/*send data to webservice*/
/*free hGenericPort, disconnect and free hGenericWS and reallocate both after 40.000 calls*/
FINALLY:
IF VALID-HANDLE(hGenericWs) THEN DO:
hGenericWs:DISCONNECT().
DELETE OBJECT hGenericWs.
END.
IF VALID-HANDLE(hGenericPort) THEN
DO:
DELETE OBJECT hGenericPort.
END.
END FINALLY.
有人用它来处理吗?
更新:现在我在8.00调用WS之后释放了Interal WS Port和Webservice Handle的变量(40.000行数量为50)