I am getting a web service response as below. It has additional XML tag and string tag in the response. I was not able to load this response into XMLDocument object in Dot Net. I have asked web service provider to remove those tags before sending response. But they said that this is the web service standard. Is it how web service suppose send the response?
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/"><?xml version="1.0" encoding="UTF-8"?><?ACORD version="1.7.0"?>
<ACORD><InsuranceSvcRs></InsuranceSvcRs></ACORD></string>
Here is the code that calls web service
using (var webClient = new WebClient())
{
webClient.Credentials = Credentials;
byte[] responseArray;
NameValueCollection postValues = GetParameters();
responseArray = webClient.UploadValues(GetUploadURL(), "POST", postValues);
responseString = Encoding.ASCII.GetString(responseArray);
}
Since I am using WebClient (not web service proxy), does web client class format the response like this?
EDIT: When I tried with sample HelloWorld webservice with the above code, I got the response like this
<?xml version=\"1.0\" encoding=\"utf-8\"?><string xmlns=\"http://tempuri.org/\">Hello World</string>
Having said that, I am repharasing my question Is it how webservice suppose send the response, when client proxy POST to the webservice?