XMLHTTP send, Calling NAV webservice from NAV

Benno67Benno67 Member Posts: 39
edited 2012-08-16 in NAV Three Tier
Hi All!
We have got a fuzzy problem with xmlhttp.send.

This message is for C/AL programmers:

The call to member send failed. msxml3.dll returned the following message:
The download of the specified resource has failed.


Why is msxml3 used?, both 3 and 6 are installed, the automation object for the xmlhttp variable is Microsoft XML v6???
Tryed tot change the variable to Microsoft XML v3, but gave the same error.
As examples we used Freddy's blog, and checked it against Rashed Job que sample. Both the same principle.
Checked is also on a local installation, same result.

Benno

Answers

  • thegunzothegunzo Member Posts: 274
    I have sometimes had this issue if using 'Microsoft XML, v6.0'.ServerXMLHTTP on a client or 'Microsoft XML, v6.0'.XMLHTTP on a server.

    Have solved this issue this way
    IF ISSERVICETIER THEN BEGIN
      IF ISCLEAR(WinHTTPServer) THEN
        CREATE(WinHTTPServer,TRUE,FALSE);
      WinHTTPServer.open('GET',URL,FALSE);
      WinHTTPServer.send('');
    
      IF WinHTTPServer.status <> 200 THEN
        ERROR(Text007,WinHTTPServer.status,WinHTTPServer.statusText);
    
      DOMDocument.load(WinHTTPServer.responseXML);
      CLEAR(WinHTTPServer);
    END ELSE BEGIN
      IF ISCLEAR(WinHTTP) THEN
        CREATE(WinHTTP,TRUE,FALSE);
      WinHTTP.open('GET',URL,FALSE);
      WinHTTP.send('');
    
      IF WinHTTP.status <> 200 THEN
        ERROR(Text007,WinHTTP.status,WinHTTP.statusText);
    
      DOMDocument.load(WinHTTP.responseXML);
      CLEAR(WinHTTP);
    END;
    
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
  • Benno67Benno67 Member Posts: 39
    Thank you Gunnar,

    I solved the problem, apparently, msxml3 has a problem on a / instead of a \ in the username…
    Stupid mistake.
    Still do not understand why msxml3 is used.

    Benno
Sign In or Register to comment.