Hi,
I need help in my code migration.Thanks in advance.
I have an asp code which has to be migrated to asp.net (Current ASP code uses com components(Server.CreateObject ("MSXML2.ServerXMLHTTP")) to post the data to Partner System ( Remote Server) which i have to migrate to .net)
Issue:
I am facing difficulty in determining how to read the request (XML Data)in my webpage,which is posted through "POST" method from Fusion system through WebService.
Fusions system is going to send xml data to webpage through “HTTP Post” method and our Webpage has to read the request and send that XML data to Partner System( Remote System).
Below is the sample code which is used by fusion to post the data:
string sPostURL =(string) Utility.RegUtil.getAppConfig("PostURL",typeof(System.String));
string sPostURLUser=(string) Utility.RegUtil.getAppConfig("PostURLUser",typeof(System.String));
string sPostURLPassword=(string) Utility.RegUtil.getAppConfig("PostURLPassword",typeof(System.String));
string sHTTPResponse = "";
MSXML2.ServerXMLHTTPClass objXMLPost = new MSXML2.ServerXMLHTTPClass();
objXMLPost.setTimeouts(60000, 60000, 300000, 60000);
objXMLPost.open("POST", sPostURL, false, sPostURLUser,sPostURLPassword);
objXMLPost.setRequestHeader("Content-Type", "text/xml");
objXMLPost.send(sXmlToPost);
while (objXMLPost.readyState != 4)
{
}
sHTTPResponse = objXMLPost.responseText;
if (objXMLPost.status !=200)
sHTTPResponse="";
return sHTTPResponse;
In my C# .net application I am trying to use HttpWebRequest and HttpWebResponse to post the data to Partner System.