XMLHttpRequest := XMLHttpRequest.Create(WebServiceURL); XMLHttpRequest.Method('POST'); XMLHttpRequest.ContentType('text/xml;charset=utf-8'); XMLHttpRequest.Headers.Add('SOAPAction',QueueHeader.ProcessType); XMLHttpRequest.KeepAlive(TRUE); QueueHeader.CALCFIELDS("Xml Request"); QueueHeader."Xml Request".CREATEINSTREAM(myInStream,TEXTENCODING::UTF8); vBigText.READ(myInStream); Bytes := Encoding.UTF8.GetBytes(vBigText); XMLHttpRequest.ContentLength(Bytes.Length); XMLHttpRequest.Proxy(); MemoryStream := MemoryStream.MemoryStream(); MemoryStream := XMLHttpRequest.GetRequestStream; MemoryStream.Write(Bytes,0,Bytes.Length); MemoryStream.Close; MemoryStream.Dispose; XMLHttpResponse := XMLHttpRequest.GetResponse; XMLDoc := XMLDoc.XmlDocument(); XMLDoc.Load(XMLHttpResponse.GetResponseStream); XMLHttpResponse.Close; XMLDoc.Save(Response);
Answers