我想與C#中的易趣API接口。他們給出的C#中的示例代碼可以很好地工作。這似乎是使用VS中的「Web引用」(我正在使用2008 Express)。Ebay eBayAPIInterfaceClient C#幫助
當我有一個去加入一個「服務引用」我的項目,我必須使用eBayAPIInterfaceClient
以下列方式(我無法找到任何ebayAPIInterfaceService
像他們爲榜樣參考使用):
eBayAPIInterfaceClient client = new eBayAPIInterfaceClient();
CustomSecurityHeaderType credentials = new CustomSecurityHeaderType();
credentials.Credentials = new UserIdPasswordType();
credentials.Credentials.AppId = AppSettings.EbayAppID;
credentials.Credentials.DevId = AppSettings.EbayDevID;
credentials.Credentials.AuthCert = AppSettings.EbayCertID;
credentials.eBayAuthToken = AppSettings.EbayToken;
GeteBayOfficialTimeRequestType ebayTimeReq = new GeteBayOfficialTimeRequestType();
ebayTimeReq.Version = "551";
GeteBayOfficialTimeResponseType response = client.GeteBayOfficialTime(ref credentials, ebayTimeReq);
無論如何,它不起作用(顯然我使用的是相同的設置,如AppID,令牌等)。這讓我回:
com.ebay.app.pres.service.hosting.WebServiceDisabledException: The web service eBayAPI is not properly configured or not found and is disabled.
任何想法?我的意思是我假設我沒有在這裏做任何真正愚蠢的事情:)
沒有爲eBayAPIInterfaceClient沒有URL屬性還沒有爲異步調用沒有憑據屬性。 – 2012-10-12 14:37:23