Serialize ASP.NET Web Service HTTP POST request results
I am trying to serialize my webmethod output (rename XML element with results), So far
[return: System.Xml.Serialization.SoapElementAttribute("results")]
before method declaration works fine with soap requests, but I am looking for something that would work the same way with HTTP POST/GET requests as well (right now I get retu开发者_运维百科rn class name as element name)
Have you considered using ASP.NET WebAPI? I think this is what you are looking for if you just beginning your project. You can find a step-by-step tutorial here: http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
精彩评论