2
嗨有 我有一個IPhone應用程序正在從.net webservice下載數據。 web服務使用以下: -通過webservice下載圖片
[System.Web.Script.Services.ScriptService] 公共類DownloadHelperService:System.Web.Services.WebService {
public DownloadHelperService() {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
[System.Web.Script.Services.ScriptMethod(UseHttpGet = false)]
public byte[] Download(string fileName)
{
return Facade.IOHelper.DownloadFileFromServer(fileName);
}
}
此方法理論上會將圖像文件下載到客戶端。問題在於,這被作爲Json下載,效率低下。 如果我脫掉scriptmethod屬性和類級腳本,那麼我無法從我的iPhone應用程序進行調用,因爲它表示我的方法調用需要scriptmethod屬性。
如果任何人都可以在最佳路線上建議使用Objective-C的,我會永遠感激