HttpWebRequestMgt.Initialize('URL'); HttpWebRequestMgt.DisableUI; HttpWebRequestMgt.SetMethod('POST'); HttpWebRequestMgt.AddBody(FilePath); //Xml file path TempBlob.INIT; TempBlob.Blob.CREATEINSTREAM(Instr); IF HttpWebRequestMgt.GetResponse(Instr,HttpStatusCode,ResponseHeaders) THEN BEGIN MESSAGE('HttpStatusCode : '+FORMAT(TempBlob.ReadAsText('',TEXTENCODING::UTF8))); //Save response.... XMLDocumentTest :=XMLDocumentTest.XmlDocument; XMLDocumentTest.Load(Instr); XMLDocumentTest.Save('C:\xml1.xml'); END;
Name DataType Subtype
HttpWebRequestMgt Codeunit Http Web Request Mgt.
TempBlob Record TempBlob
Instr InStream
XMLDocumentTest DotNet System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
HttpStatusCode DotNet System.Net.HttpStatusCode.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
ResponseHeaders DotNet System.Collections.Specialized.NameValueCollection.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Answers
If this is the case, you can write your xml file into a bigtext and send this via webservice.
Some thing come in handy here:
1. bigtexts can store binary data (including null terminals) up to any size.
2. strings in .NET can have any size and any content
I have created the XML file & stored it in a physical Path & now I want to send the whole file into a Web Service. Is it possible without considering the bigtext ??
Successfully I'm able to send my created xml file into the Web Service. The following code helps me in this requirement...