Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Outstream initialize error

$
0
0
Hi

I have the following code - and gets the error :

"Microsoft.Dynamics.Nav.Runtime.NavOutStream variable not initialized"

LOCAL SendXMLCall(WebServiceURL : Text;Request : InStream;VAR Response : OutStream;VAR ErrorMsg : Text) StatusOK : Boolean
 
//Prepare the request. Load it as a text into an XML document.
vBigText.READ(Request);
vBigText.GETSUBTEXT(TempString,1);
XMLDoc := XMLDoc.XmlDocument();
XMLDoc.LoadXml(TempString);
 
//Start the web service call
XMLHttpRequest := XMLHttpRequest.Create(WebServiceURL);
XMLHttpRequest.Method('POST');
XMLHttpRequest.ContentType('text/xml;charset=utf-8');
XMLHttpRequest.KeepAlive(TRUE);
 
//Send the XMLDoc to the HttpRequest
streamWritter := streamWritter.StreamWriter(XMLHttpRequest.GetRequestStream, Encoding.UTF8);
XMLDoc.Save(streamWritter);
streamWritter.Close();
 
//Get the http response and save it in the response variable
XMLHttpResponse := XMLHttpRequest.GetResponse;
XMLDoc.Load(XMLHttpResponse.GetResponseStream);
XMLHttpResponse.Close;
XMLDoc.Save(Response);

Can anyone help med here - Thanks


Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>