這是一段代碼片段。請告訴我這兩個代碼有什麼區別,以及哪些內容適合這些代碼片段。 「應用程序/ 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