EBayAPIInterfaceService Could not be found

I can't seem to get even the simplest Ebay Api Call. I am trying to make a tutorial found here:

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

However, I keep getting the error message:

"could not find the type or namespace 'eBayAPIInterfaceService' (you are missing a link to a directive or assembly?)

(using Visual Studio 2012)

I added a service link http://developer.ebay.com/webservices/latest/ebaySvc.wsdl

I have definitely added the using statement. All other ebay Api objects recognized by CustomSecurityHeaderType, GeteBayOfficialTimeRequestType and GeteBayOfficialTimeResponseType are not displayed as errors. It seems that this is only an eBayAPIInterfaceService

I have been looking for solutions to this problem, and others seem to have had this problem in the past, but I cannot find any solutions.

+4
source share
2 answers

From what I can say, 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 don't have an eBay API key or anything else, so I cannot verify it.

+7
source

If you find this page, you are looking for the wrong place for your hello world API example. There is a newer version of this example, here is how you find it:

Download and install the eBayDotNET40sdk817.msi file from eBay (you still need to do this if you haven’t already): https://go.developer.ebay.com/developers/ebay/documentation-tools/sdks/dotnet

Then you will have two examples of tutorials located on your hard drive: C: \ Program Files \ eBay \ eBay.NET SDK v817 Release \ Tutorials \ C #

Two tutorials: Tutorial_HelloWorld.doc, Tutorial_ConsoleAddItem.doc

I tried the add-item tutorial and it did a great job copying and pasting the code. I have not tried to welcome the world tutorial, but I see that it is an updated version and does not use eBayAPIInterfaceClient or eBayAPIInterfaceService.

As a note: COM links that you need to add to the project are located in the C: \ Program Files \ eBay folder.

Finally, if you want the code in Sebastian the wonderful answer (above) to work, then be sure to put requestURL where you create the eBayAPIInterfaceClient instance, for example:

 eBayAPIInterfaceClient service = new eBayAPIInterfaceClient("eBayAPI", requestURL); 

(I tried to edit his answer, but it did not work)

Good luck! :)

+4
source

All Articles