我通過調用webservice獲取pagepack助手的列表。我已經添加了Web引用。調用webservice時出錯
using org.xerox.xde3.na.sdi.amiller_v_vista;
public org.xerox.xde3.na.sdi.amiller_v_vista.DDCControl proxy;
在頁面加載方法,我調用Web方法如下
proxy = new DDCControl();
Guid y = new Guid("45a5b1c2-2fa5-4136-abdd-bc213b694848");
DataList1.DataSource = proxy.GetAllDDCs(this.AccountID, y);
DataList1.DataBind();
我收到以下錯誤:
An invalid data source is being used for DataList1. A valid data source must implement either IListSource or IEnumerable
public DDCReturnGetAll GetAllDDCs(Guid accountId, Guid authToken);
GetAllDDCs的返回類型是DDCReturnGetAll
其中
public class DDCReturnGetAll : DDCReturnBase
{ public DDCReturnGetAll();
public DDCInfo2[] DDCs { get; set; } }
其中
DDCInfo2是
public class DDCInfo2 { public DDCInfo2();
public BrandingType brandingType { get; set; }
public string ChargebackName { get; set; }
public string CollectorName { get; set; }
public string Description { get; set; }
public string URL { get; set; } }
能否請你幫我這個問題?
GetAllDDCs返回的類型是什麼?在對象瀏覽器窗口中查看它在客戶端上返回的內容。同時告訴我們它在服務器上返回的結果。 – 2010-03-29 14:21:42
你可以顯示一部分DDCControl的代碼嗎? – 2010-03-29 14:22:01
GetAllDDC的返回類型爲DDCReturnGetAll,其中 公共類DDCReturnGetAll:DDCReturnBase { public DDCReturnGetAll(); public DDCInfo2 [] DDCs {get;組; } } 其中DDCInfo2是 public class DDCInfo2 public DDCInfo2(); public BrandingType brandingType {get;組; } public string ChargebackName {get;組; } public string CollectorName {get;組; } public string描述{get;組; } public string URL {get;組; }} – xrx215 2010-04-02 14:41:39