我只需要在保存從請求解析的數據後返回響應,但不知道如何。什麼數據類型應該是我用來保存數據的方法。WCF服務 - 狀態
public string SaveData(RawData data)
{
// save the data as txt file
OutgoingWebResponseContext response = WebOperationContext.Current.OutgoingResponse;
response.StatusCode = HttpStatusCode.OK;
response.StatusDescription = "SUCCESS";
return null; //??? what i should do here?
}
那麼,你是方法聲明表示'字符串'返回,所以我建議只是 - 一個'字符串'。 – Tim
爲什麼不返回'response'對象? – DeanOC
所以你定義了你自己的方法,並且你已經決定它必須返回一個字符串。那麼你問我們要告訴你什麼字符串返回? – Biscuits