Im trying to deserialize the response from this simple web service
Im using the following code:
WebRequest request = WebRequest.Create(\"http://inb37
You want to deserialize the XML and treat it as a fragment.
There's a very straightforward workaround available here. I've modified it for your scenario:
var webRequest = WebRequest.Create("http://inb374.jelastic.tsukaeru.net:8080/VodafoneDB/webresources/vodafone/04111111");
using (var webResponse = webRequest.GetResponse())
using (var responseStream = webResponse.GetResponseStream())
{
var rootAttribute = new XmlRootAttribute();
rootAttribute.ElementName = "response";
rootAttribute.IsNullable = true;
var xmlSerializer = new XmlSerializer(typeof (string), rootAttribute);
var response = (string) xmlSerializer.Deserialize(responseStream);
}