Problem with msxml3.dll while sending xml

zeonzeon Member Posts: 130
Hi,

I have a problem with msxml3.dll while sending an URL. On my development server it works flawless, but on the customers test server I often get the error.

The code executed is the following:
Name            DataType	Subtype	Length
HTTPreq	   Automation	'Microsoft XML, v3.0'.XMLHTTP	
xmlTextNode  Automation	'Microsoft XML, v3.0'.IXMLDOMText	
xmlDoc	   Automation	'Microsoft XML, v3.0'.DOMDocument	

CLEAR(HTTPreq);
CREATE(HTTPreq,TRUE);
CREATE(xmlDoc);
xmlTextNode := xmlDoc.createTextNode('');
xmlTextNode.appendData(URL[1]);
xmlTextNode.appendData(URL[2]);
xmlTextNode.appendData(URL[3]);
xmlTextNode.appendData(URL[4]);
xmlTextNode.appendData(URL[5]);

HTTPreq.open('POST',xmlTextNode.nodeValue, FALSE);
HTTPreq.setRequestHeader('Content-type','text/xml');
HTTPreq.send(xmlTextNode.nodeValue);

IF NOT (HTTPreq.status = 200) THEN
  MESSAGE(FORMAT(COPYSTR(HTTPreq.statusText,1,250)));

When it executes the line
HTTPreq.send(xmlTextNode.nodeValue);
it gives the following error. The weird thing is that this code is called around 100 times for each URL that I have to send, but it only happens sometimes ](*,)



I have tried to re-register msxml3.dll on the server, but with no success :(

It's on Navision Attain 3.70B.

Any ideas?

/zeon

Comments

  • rmv_RUrmv_RU Member Posts: 119
    There are many cases when this error occurs. I think you should check antivirus, firewall and proxy errors and settings first.
    Looking for part-time work.
    Nav, T-SQL.
  • zeonzeon Member Posts: 130
    Oh, I might have found the problem and a solution. I discovered that when I debugged the code it worked properly. I then inserted a sleep after the send call, and then it worked. So, it seems like the code is executed faster than the send call is able to send the request? :?

    Is there a way to check if the send call has been executed correct and not continue until finished?

    Maybe using "waitForResponse"?

    Something like
    WHILE NOT Ready DO
      Ready := HTTPreq.waitForResponse(0.1);
    

    I also changed variable:
    HTTPreq      Automation   'Microsoft XML, v3.0'.XMLHTTP
    

    to
    HTTPreq      Automation   'Microsoft XML, v3.0'.ServerXMLHTTP
    

    I'm new in using xmlhttp, so help is appreciated. Thx!
Sign In or Register to comment.