Hello!
I'm in trouble with error 5486, more details at: stackoverflow.com/.../openedge-progress-10-2b-calling-webservice-error-5486-transport-resources-una
The code is at "stackoverflow" link I've put in the main post. But OK, here it is:
PROCEDURE enviarDadosWsGenerico:
DEF INPUT PARAM cTransacao AS CHAR.
DEF INPUT PARAM cNameSpaceUrl AS CHAR.
DEF INPUT PARAM cConteudo AS LONGCHAR.
DEF INPUT PARAM cTransactionMethod AS CHAR.
DEF INPUT PARAM hPort AS HANDLE.
DEF OUTPUT PARAM cRetorno AS CHAR.
DEF VAR cPayload AS LONGCHAR NO-UNDO.
DEF VAR cParamsWrapped AS LONGCHAR NO-UNDO.
DEF VAR lErro AS LOG NO-UNDO.
DEF VAR cArqName AS CHAR NO-UNDO.
cPayload = '<![CDATA[' + cConteudo + ']]>'.
cParamsWrapped = '<ns0:' + cTransactionMethod + ' xmlns:ns0="' + cNameSpaceUrl + '">'.
cParamsWrapped = cParamsWrapped + '<ns0:CTRANSAC>' + cTransacao + '</ns0:CTRANSAC><ns0:CXML>' + cPayload + '</ns0:CXML>'.
cParamsWrapped = cParamsWrapped + '</ns0:' + cTransactionMethod + '>'.
cArqName = SESSION:TEMP-DIRECTORY + '/' + cTransacao + '_FULLXML_' + replace(string(TODAY), '/', '') + replace(STRING(TIME, 'hh:mm:ss'), ':', '') + '.xml'.
COPY-LOB FROM cParamsWrapped TO FILE cArqName NO-CONVERT.
RUN value(cTransactionMethod) IN hPort (INPUT cParamsWrapped, OUTPUT cRetorno).
RUN trataRetornoWS(INPUT-OUTPUT cRetorno, OUTPUT lErro).
IF lErro THEN
DO:
RETURN 'nOK'.
END.
ELSE
DO:
RETURN 'OK'.
END.
END PROCEDURE.
About Progress version, I'll find it and the I'll reply here
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.
1) Ensure that you are NOT doing connect, run, disconnect on the web service.
2) Ensure you are cleaning up your handles.
3) Try enabling 4GLTrace and DynObjects.* tracing.
Brian,
I've put the code I thought that was enough and also not to pollute the forum. Here are some answer to what you questioned me:
1 - I make the connection just one time and disconnect after the entire process. So I'm not reconnecting at each call;
2 - I'm cleaning them just at the end of the process;
3) I'm not using any CLS program, so that I did not enabled DynObjects.* tracing but 4GLMesses, 4GLTrace and 4GLTrans.
Brian, I've sent you the code with "preprocess" like you asked me.
You will see that I have 3 crucial moments. PurchaseRequest data, PurchaseOrder data and Operations data. First I've tried just to free and reallocate WS Internal Port Procedure at the beginning of these 3 macro blocks, without success. After this, I've tried to release handles after 40.000 times in order to free resources, but It didn't worked yet.
My "new bid" is also disconnect WS and reallocate WS server.
The Progress version is 10.2B0837
Brian,
I've done some research and found this: knowledgebase.progress.com/.../000031099.
As I use dataset, XML and LOGNCHAR at my code, it seems a memory leak.
Have you ever seen it?