Has anyone used MSXML.XMLHTTPRequest ?
We have a process that sends information to a 3rd party and it was originally created using automation. Since the automation tools are not working in our recent NAV2017 upgrade the process was rewritten using MSXML.
The process seems to work with exception that is says that XMLHTTP is not instantiated? The code is below along with the variable call.
MSXML.XMLHTTPRequest.'Microsoft.MSXML, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
//Build the Request Header
XMLHTTP.open('POST', XmlUrl, FALSE,'','');
XMLHTTP.setRequestHeader('HOST', 'urlinfo.net');
XMLHTTP.setRequestHeader('Content-type', 'text/xml; charset=utf-8');
XMLHTTP.setRequestHeader('SOAPAction', '
http://urlinfo.net/SubmitWebInfo');
Any help would be appreciated.
Thanks
Answers
MSXML is not support by Microsoft through .NET
https://support.microsoft.com/en-us/help/815112/the-use-of-msxml-is-not-supported-in-net-applications
Follow this route https://moxie4nav.wordpress.com/2015/09/10/call-external-web-service-using-new-cu-1290/
or this route https://community.dynamics.com/nav/f/34/t/205295
I rewrote the entire process, but I'm stuck on the conversion of this part of code? How do i convert this into a SYSTEM.XML XMLHTTPRequest from MSXML?
from
MSXML <- which is sunset
MSXMLHTTP.SetRequestHeader('HOST', urlText);
MSXMLHTTP.SetRequestHeader('SOAPAction', urlString);
TO
System.XML
SYSTEMXMLHTTP.SetRequestHeader('HOST', urlText);
SYSTEMXMLHTTP.SetRequestHeader('SOAPAction', urlString);
The SetRequestHeader is not available?
thanks
try with these here instead.
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Chris
On to the next issue.
MSXMLHTTP.SEND(XMLDOM);
using system xml the send function is not valid.
Any ideas?