Hi All,
I'm getting below error when trying to get response from a external webservice,
Webservice has been consumed in NAV 2017 custom codeunit.
Below is the code i have written using CU1290, Debugger is stopping at CU1299 GetWebResponse method.
ReqText is a BigText Variable here.
Appreciate your help in solving this.
// save request text in instream
TempBlob."Primary Key" := 1;
TempBlob.Blob.CREATEOUTSTREAM(ReqBodyOutStream);
reqText.WRITE(ReqBodyOutStream);
TempBlob.Blob.CREATEINSTREAM(ReqBodyInStream);
// run the WebServReqMgt functions to send the request
WebServReqMgt.SetGlobals(ReqBodyInStream,Url,Username,Password);
WebServReqMgt.DisableHttpsCheck;
WebServReqMgt.SendRequestToWebService;
// get the response
WebServReqMgt.GetResponseContent(RespBodyInStream);
ResponseXmlDoc := ResponseXmlDoc.XmlDocument;
ResponseXmlDoc.Load(RespBodyInStream);
MESSAGE(ResponseXmlDoc.InnerXml);
ResponseXmlDoc.Save('C:\Temp\XML\Response-New.txt');
Thanks,
Madan Reddy.
Answers
There may be multiple issues for this, crosscheck your code .
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/