Hi all,
Any one with an Idea of how to retrieve data from the web to NAV? am using the DotNet datatype but getting errors.
Hi all,
Any one with an Idea of how to retrieve data from the web to NAV? am using the DotNet datatype but getting errors.
Welcome to DUG!!!
Mention which version of Navision you are using ?
What are the errors you are getting ??
Am using NAV 2009 r2 below is my code
url := Setup.“Rate Shop WS URL”;
url += ‘Address=’ + urlenc.UrlEncode(ShipAdd.Address);
url += ‘City=’ + urlenc.UrlEncode(ShipAdd.City);
url += ‘State=’ + urlenc.UrlEncode(ShipAdd.County);
url += ‘PostalCode=’ + urlenc.UrlEncode(FORMAT(ShipAdd.“Post Code”)) ;
url += ‘LicenseKey=’ + urlenc.UrlEncode(VericalSetup.“Address Validattion License”);
WebHeaders := WebHeaders.WebHeaderCollection();
HttpWebReq := HttpWebReq.Create(url);
HttpWebReq.Method(‘Get’);
HttpWebResponse := HttpWebReq.GetResponse();
StreamIn := HttpWebResponse.GetResponseStream();
StreamReader := StreamReader.StreamReader(StreamIn);
ResponseXml := ResponseXml.XmlDocument();
ResponseXml.LoadXml(StreamReader.ReadToEnd());
Microsoft Dynamics NAV
Using NAv 2009 R2
This message is for C/AL programmers: The call to member GetResponse failed: The remote server returned an error: (500) Internal Server Error…
OK