question

$$anonymous$$ avatar image
1 Like"
$$anonymous$$ asked ·

Guides/FAQ ridiculously out of date.. how to Hello World/call time?

Hi, I've been following several guides and ALL seem out of date. Even copy+pasting entire code with successfully importing the service references always seem to have 1 line of code not working.. for example, the basic API for call time for C# from here: http://developer.ebay.com/DevZone/xml/docs/HowTo/FirstCall/MakingCallCSharp.html#step1 gets an error on: eBayAPIInterfaceService service = new eBayAPIInterfaceService(); The error is pretty much saying this reference doesn't exist -- I looked into the classes for the ebay service reference and, of course, ITS NOT THERE! There's similar ones, but I don't know which one is the real/updated one. Then in the HelloWorld example from here: http://developer.ebay.com/DevZone/WindowsSDK/docs/Tutorials/C%23/HelloWorld/HelloWorld.html DateTime officialTime = apiCall.GeteBayOfficialTime(); Getting a vague "Error in the application - APIexception was not handled" highlighting only this. I even tried downloading the package full of samples and everything together and getting the same errors - Thanks!
c#outdated
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jourbandts avatar image
0 Likes"
jourbandts answered ·
Let me know if you are still having trouble. I can point you in the direction of up to date samples. I am in the midst of updating all our KB article samples. And will eventually update the "Code Samples" portion very soon.
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tetz_jo avatar image
0 Likes"
tetz_jo answered ·
I agree that everything seems very out of date, but I did get it working. Did you add a reference to the eBay.Service.dll? I had to create a user token to get some orders and such. Here is some example code: public static ApiContext apiContext = GetApiContext(); /// /// Populate eBay SDK ApiContext object with data from application configuration file /// /// ApiContext public static ApiContext GetApiContext() { //apiContext is a singleton, //to avoid duplicate config file reading if (apiContext != null) { return apiContext; } else { apiContext = new ApiContext(); //set Api Server Url apiContext.SoapApiServerUrl = ConfigurationManager.AppSettings["Environment.ApiServerUrl"]; //set Api Token to access eBay Api Server ApiCredential apiCredential = new ApiCredential(); apiCredential.eBayToken = ConfigurationManager.AppSettings["UserAccount.ApiToken"]; apiContext.ApiCredential = apiCredential; //set eBay Site target to US apiContext.Site = SiteCodeType.US; return apiContext; } } public static DateTime GetOfficialTime() { GeteBayOfficialTimeCall timeCall = new GeteBayOfficialTimeCall(apiContext); return timeCall.GeteBayOfficialTime(); }
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.