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);
Answers
For example:
TempBlob.Blob.CREATEINSTREAM(Request);
TempBlob.Blob.CREATEOUTSTREAM(Response);
Yes, i figured it out
Can you tell me how to start handling the Response (OutStream). Like Read it as an XML file, and get some value out
Thanks
Here is code snippet from me.
It reads a stream and puts it in a Text-variable (which is may not the best way).
The Text-variable will be loaded in the XML-Handler of dotNet.
The goal is to show the text of "faultstring", if it exists in the XML.