开发者

Serialize ASP.NET Web Service HTTP POST request results

开发者 https://www.devze.com 2023-01-04 01:52 出处:网络
I am trying to serialize my webmethod output (rename XML element with results), So far [return: System.Xml.Serialization.SoapElementAttribute(\"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

0

精彩评论

暂无评论...
验证码 换一张
取 消