I am trying to create web request, which sends XML via POST call and would like to return the response back in XML.
I am having a little difficulty, with getting the response back in xml, as I am little I unsure how do I set that up, in the code below. here is my attempt:
the code below, is currently throwing a null reference exception --> Object reference not set to an instance of an object.
using (HttpWebResponse hwresponse = (HttpWebResponse)hwrequest.GetResponse())
{
statusCode = (int)hwresponse.StatusCode;
if (hwresponse != null)
{ // If we have valid WebResponse then read it.
using (StreamReader reader = new StreamReader(hwresponse.GetResponseStream()))
{
// XPathDocument doc = new XPathDocument(reade ...
Go to the complete details ...