Home
Find the answer to your question
Why am I getting an error for ListingDurationTypeCode and ShippingServiceCodeType ever since I upgraded to .NET SDK 459?
Why am I getting an error for ListingDurationTypeCode and ShippingServiceCodeType ever since I upgraded to .NET SDK 459?
All schema elements that were previously based on ShippingServiceCodeType and ListingDurationCodeType are now based on xs:token (essentially string). So you need to change your code from using an enumeration to a string for ListingDuration and ShippingService. You now need to use GeteBayDetails for retrieving the list of available shipping services and GetCategoryFeatures for listing durations. Please see the Release Notes for more information.
Here is a sample .NET code using the SDK to make an AddItem call :
using System;
using eBay.Service.Call;
using eBay.Service.Core.Sdk;
using eBay.Service.Util;
using eBay.Service.Core.Soap;
namespace SDK3Examples
{
item.ShipToLocations = new
StringCollection();
item.ShipToLocations.Add("US");
FeeTypeCollection fees = addItem.AddItem(item);
return item.ItemID;
}
public ApiContext GetContext()
{
ApiContext context = new
ApiContext();
// Set the URL
context.SoapApiServerUrl =
"https://api.sandbox.ebay.com/wsapi";
// Set logging
context.ApiLogManager = newApiLogManager();
context.ApiLogManager.ApiLoggerList.Add(new
eBay.Service.Util.FileLogger("Messages.log", true,
true, true));
context.ApiLogManager.EnableLogging = true;
// Set the version
context.Version = "459";
return context;
}