Rewriting External Calls automation -> MSXML not instantiated

Steve
Member Posts: 81
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
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
Steve
0
Answers
-
Hi,
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/205295My blog - https://www.HannesHolst.com/0 -
Thank you HannesHolst
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
Steve0 -
Hi,
try with these here instead.
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
My blog - https://www.HannesHolst.com/0 -
You can also look at codeunit 1297 Http Web Request Mgt.
Chris0 -
thank you. you have been very helpful.
On to the next issue.
MSXMLHTTP.SEND(XMLDOM);
using system xml the send function is not valid.
Any ideas?
Steve0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions