Hi,
I'm trying to post an url via http post using xmlhttp. The url contains customer, delivery and item information. As this url can be very long I have created a text array of urls. Url is datatype Text and of length 1024 with five dimensions. The problem arises when I try to send the url:
CLEAR(HTTPreq); //HTTPreq = Automation 'Microsoft XML, v6.0'.XMLHTTP'Microsoft XML, v6.0'.XMLHTTP
CREATE(HTTPreq,TRUE);
HTTPreq.open('POST',URL[1]+URL[2]+URL[3]+URL[4]+URL[5], FALSE);
HTTPreq.setRequestHeader('Content-type','text/xml');
HTTPreq.send(URL[1]+URL[2]+URL[3]+URL[4]+URL[5]);
When the combined length of URL[1]+URL[2]+URL[3]+URL[4]+URL[5] exceeds 2044 characters I receive the following error:
"There is not sufficient available space in the C/AL stack memory to execute the task".
"There are too many simultaneous activities, due to the way recursive function call is used in the program. The problem can be solved temporarily by shutting down some of the open activities (but the function still cannot be executed)."
If I send 2043 characters it will be succesful.
The above code is placed in a codeunit and is called from a report which also generates an Excel document. In the OnPostReport trigger of the report I have a repeat-until construct which calls this codeunit to send an url with info to another web system. There is no recursive calls. Btw I can call the above codeunit more than 100 times with an URL shorterthan 2044 characters, and it will succeed. But if I call it once with an url that exceeds 2044 characters it will fail. ](*,)
Any ideas what could be wrong or ideas for an alternative solution?
I'm running this on Attain 3.70.
Answers
Nav, T-SQL.
I thought that it is correctly installed as I use 'Microsoft XML, v6.0'.XMLHTTP'Microsoft XML, v6.0'.XMLHTTP to create the http request?
Any ideas?
You must create XML Document first.
Nav, T-SQL.
/zeon