I need to mark eBay order as shipped via eBay API.
Have a method:
public void ShippEbayOrder(EbayOrder ebayOrder)
{
string Developer = WebConfigurationManager.AppSettings["EbayProductionDevID"];
string Application = WebConfigurationManager.AppSettings["EbayProductionAppID"];
string Certificate = WebConfigurationManager.AppSettings["EbayProductionCertID"];
string eBayToken = WebConfigurationManager.AppSettings["EbayProductionUserToken"];
string SoapApiServerUrl = WebConfigurationManager.AppSettings["EbayProductionApiServerUrl"];
string SignInUrl = WebConfigurationManager.AppSettings["EbayProductionSignInUrl"];
string EPSServerUrl = WebConfigurationManager.AppSettings["EbayProductionEPSUrl"];
var ebayService = GetebayService();
CompleteSaleRequestType completeSaleRequestType = new CompleteSaleRequestType();
completeSaleRequestType.Version = version;
if (ebayOrder.ContainsOrderType == EbayOrder.OrderType.Transaction)
{
completeSaleRequestType.TransactionID = ebayOrder.SourceOrderId;
completeSaleRequestType.ItemID = ebayOrder.ItemsInfo[0].SourceItemId;
}
else
completeSaleRequestType.OrderID = ebayOrder.SourceOrderId;
completeSaleRequestType.Shipped = true;
completeSaleRequestType.ShippedSpecified = true;
CompleteSaleResponseType completeSaleResponseType = ebayService.CompleteSale(completeSaleRequestType);
But when code calls CompleteSale method, it throws an exeption:
java.lang.ClassCastException: com.ebay.domain.apisoap.pres.service.hosting.soap.basecomponents.GetSellerTransactionsResponseType incompatible with com.ebay.domain.apisoap.pres.service.hosting.soap.basecomponents.CompleteSaleResponseType
Who can help me? Thank you!
right code and method should be: