这是一段代码片段。请告诉我这两个代码有什么区别,以及哪些内容适合这些代码片段。 “应用程序/ XML” 或 “普通/文本”WCF REST POST XML
[OperationContract]
[WebInvoke(Method="POST", UriTemplate="DoSomething")]
public XElement DoSomething(XElement body) {
...
return new XElement("Result");
}
[OperationContract]
[WebInvoke(Method="POST", UriTemplate="DoSomething")]
public string DoSomething(string body) {
...
return "thanks";
}
请重新设置您的代码段以便我们可以阅读它。 – AxelEckenberger 2010-03-03 00:13:42