Hi,
I have an issue that can't find a solution and need your help.
I'm calling a We Service via 'Microsoft XML, v6.0'.ServerXMLHTTP and to some extent i'm being sucessfull.
My issue comes when the response is very large.
I'm able to call the Web service without any problems.
XMLHttpConn.open('POST',URL);
XMLHttpConn.setTimeouts(10000,10000,10000,0);
XMLHttpConn.setRequestHeader('Content-Type','text/xml; charset=utf-8');
XMLHttpConn.setRequestHeader('SOAPAction',SOAPAct);
XMLHttpConn.send( XMLDoc );
And I'm able to get a response
IF ISCLEAR(XMLDoc2) THEN BEGIN
CREATE(XMLDoc2,TRUE,TRUE);
XMLDoc2.async(TRUE);
END;
XMLDoc2.load(XMLHttpConn.responseXML);
XMLDoc2.save('c:\response.xml');
Up until now things work very well. Wether I get a small or a large response the file is saved with the apropriate structure.
The problem comes when I try to save it to a Blob. It only works if the response is small.
XMLNode := XMLDoc2.lastChild;
recInterfaceSetup.Blob.CREATEOUTSTREAM(OutStr);
OutStr.WRITE(XMLNode.xml);
If the response is large (over 100 KB) I get the following error "This Automation variable has not been instantiated. You can instantiate it by either creating or assigning it."
The thing is, I am instantiating it and assigning it.
Do you have any idea what could be reason for this? It works when the XMLHttpConn.responseXML is small, and wether it is small or large the XML File is saved with what I want.
Thank you for your help.
Comments
then use xmlport to parse through it if you need to.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I then found the real reason for the error. Apparently the debug was stopping in the wrong place.
Thank you very much for your help.