我想与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