I need to create a .Net web service (WCF is out of the question) that should receive xml and return xml. I initially setup the function like so:
[WebMethod]
public string myFunc(string xmlRequest)
{
How can I change the HTTP POST content-type to text/xml? Also, I'm returning the xml response as a string, but in the web service help page it says the response will be:
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://www.mysite.com/myFunc">string</string>
I need to remove that root <string>
element somehow.
This web service is called by another company who is probably not using .Net to post the XML as text/xml to my endpoint.