找不到eBayAPIInterfaceService [英] eBayAPIInterfaceService Could not be found

查看:216
本文介绍了找不到eBayAPIInterfaceService的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法得到连最基本的eBay API调用工作。我想在这里做发现教程:



http://developer.ebay.com/DevZone/xml/docs/HowTo/FirstCall/MakingCallCSharp.html



不过,我不断收到读取错误:



找不到类型或命名空间eBayAPIInterfaceService(是否缺少using指令或程序集引用? )



(使用Visual Studio 2012)



我添加了服务引用的 http://developer.ebay.com/webservices/latest/ebaySvc.wsdl



我确信添加using语句。所有其他的eBay API对象被公认
CustomSecurityHeaderType,GeteBayOfficialTimeRequestType和GeteBayOfficialTimeResponseType没有显示出来的错误。它似乎只eBayAPIInterfaceService



我搜索过这个问题的解决方案,它似乎像其他人曾在过去的这个问题,但是我无法找到任何解决方案。


< DIV CLASS =h2_lin>解决方案

据我所知,此代码应工作:

  eBayAPIInterfaceClient服务=新eBayAPIInterfaceClient(eBayAPI); 

//设置凭据
CustomSecurityHeaderType requesterCredentials =新CustomSecurityHeaderType();
requesterCredentials.eBayAuthToken =yourToken; //使用令牌
requesterCredentials.Credentials =新UserIdPasswordType();
requesterCredentials.Credentials.AppId = APPID;
requesterCredentials.Credentials.DevId = DEVID;
requesterCredentials.Credentials.AuthCert = certId;

//使呼叫GeteBayOfficialTime
GeteBayOfficialTimeRequestType要求=新GeteBayOfficialTimeRequestType();
request.Version =405;
GeteBayOfficialTimeResponseType响应= service.GeteBayOfficialTime(REF requesterCredentials,请求);
Console.WriteLine(eBay的总部设在美国加利福尼亚州圣何塞,美国的时间是:);
Console.WriteLine(response.Timestamp);



我没有eBay的API密钥或任何东西,所以我真的不能测试它。


I can't seem to get even the most basic Ebay Api Call working. I'm trying to do the tutorial found here:

http://developer.ebay.com/DevZone/xml/docs/HowTo/FirstCall/MakingCallCSharp.html

However i keep getting an error that read:

"the type or namespace 'eBayAPIInterfaceService' could not be found(are you missing a using directive or assembly reference?)

(Using Visual Studio 2012)

I added the service reference http://developer.ebay.com/webservices/latest/ebaySvc.wsdl

I made sure to add the using statement. All other ebay Api objects are being recognized CustomSecurityHeaderType, GeteBayOfficialTimeRequestType and GeteBayOfficialTimeResponseType are not showing up as errors. Its seems to be only eBayAPIInterfaceService

I've searched for solutions to this problem and it seems like others have had this problem in the past however I can't find any solutions.

解决方案

From what I can tell, this code should work:

eBayAPIInterfaceClient service = new eBayAPIInterfaceClient("eBayAPI");

// Set credentials
CustomSecurityHeaderType requesterCredentials = new CustomSecurityHeaderType();
requesterCredentials.eBayAuthToken = "yourToken";    // use your token
requesterCredentials.Credentials = new UserIdPasswordType();
requesterCredentials.Credentials.AppId = appId;
requesterCredentials.Credentials.DevId = devId;
requesterCredentials.Credentials.AuthCert = certId;

// Make the call to GeteBayOfficialTime
GeteBayOfficialTimeRequestType request = new GeteBayOfficialTimeRequestType();
request.Version = "405";
GeteBayOfficialTimeResponseType response = service.GeteBayOfficialTime(ref requesterCredentials, request);
Console.WriteLine("The time at eBay headquarters in San Jose, California, USA, is:");
Console.WriteLine(response.Timestamp);

I have no eBay API key or anything so I can't really test it.

这篇关于找不到eBayAPIInterfaceService的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆