Changes since
the last release

com.ebay.sdk
Class ApiCall

java.lang.Object
  extended by com.ebay.sdk.ApiCall
Direct Known Subclasses:
AddDisputeCall, AddDisputeResponseCall, AddItemCall, AddItemFromSellingManagerTemplateCall, AddItemsCall, AddLiveAuctionItemCall, AddMemberMessageAAQToPartnerCall, AddMemberMessageRTQCall, AddMemberMessagesAAQToBidderCall, AddOrderCall, AddSecondChanceItemCall, AddSellingManagerInventoryFolderCall, AddSellingManagerProductCall, AddSellingManagerTemplateCall, AddToItemDescriptionCall, AddToWatchListCall, AddTransactionConfirmationItemCall, ApproveLiveAuctionBiddersCall, CompleteSaleCall, ConfirmIdentityCall, DeleteMyMessagesCall, DeleteSellingManagerInventoryFolderCall, DeleteSellingManagerItemAutomationRuleCall, DeleteSellingManagerProductCall, DeleteSellingManagerTemplateAutomationRuleCall, DeleteSellingManagerTemplateCall, EndItemCall, EndItemsCall, FetchTokenCall, GetAccountCall, GetAdFormatLeadsCall, GetAllBiddersCall, GetApiAccessRulesCall, GetAttributesCSCall, GetAttributesXSLCall, GetBestOffersCall, GetBidderListCall, GetCategoriesCall, GetCategory2CSCall, GetCategoryFeaturesCall, GetCategoryListingsCall, GetCategoryMappingsCall, GetCategorySpecificsCall, GetChallengeTokenCall, GetCharitiesCall, GetClientAlertsAuthTokenCall, GetContextualKeywordsCall, GetCrossPromotionsCall, GetDescriptionTemplatesCall, GetDisputeCall, GeteBayDetailsCall, GeteBayOfficialTimeCall, GetFeedbackCall, GetHighBiddersCall, GetItemCall, GetItemRecommendationsCall, GetItemsAwaitingFeedbackCall, GetItemShippingCall, GetItemTransactionsCall, GetLiveAuctionBiddersCall, GetLiveAuctionCatalogDetailsCall, GetMemberMessagesCall, GetMessagePreferencesCall, GetMyeBayBuyingCall, GetMyeBayRemindersCall, GetMyeBaySellingCall, GetMyMessagesCall, GetNotificationPreferencesCall, GetNotificationsUsageCall, GetOrdersCall, GetOrderTransactionsCall, GetPictureManagerDetailsCall, GetPictureManagerOptionsCall, GetPopularKeywordsCall, GetProductFamilyMembersCall, GetProductFinderCall, GetProductFinderXSLCall, GetProductsCall, GetProductSearchPageCall, GetProductSearchResultsCall, GetProductSellingPagesCall, GetPromotionalSaleDetailsCall, GetPromotionRulesCall, GetSearchResultsCall, GetSellerDashboardCall, GetSellerEventsCall, GetSellerListCall, GetSellerPaymentsCall, GetSellerTransactionsCall, GetSellingManagerAlertsCall, GetSellingManagerEmailLogCall, GetSellingManagerInventoryCall, GetSellingManagerInventoryFolderCall, GetSellingManagerItemAutomationRuleCall, GetSellingManagerSaleRecordCall, GetSellingManagerSoldListingsCall, GetSellingManagerTemplateAutomationRuleCall, GetSellingManagerTemplatesCall, GetSessionIDCall, GetShippingDiscountProfilesCall, GetStoreCall, GetStoreCategoryUpdateStatusCall, GetStoreCustomPageCall, GetStoreOptionsCall, GetStorePreferencesCall, GetSuggestedCategoriesCall, GetTaxTableCall, GetTokenStatusCall, GetUserCall, GetUserContactDetailsCall, GetUserDisputesCall, GetUserPreferencesCall, GetVeROReasonCodeDetailsCall, GetVeROReportStatusCall, GetWantItNowPostCall, GetWantItNowSearchResultsCall, IssueRefundCall, LeaveFeedbackCall, MoveSellingManagerInventoryFolderCall, PlaceOfferCall, RelistItemCall, RemoveFromWatchListCall, RespondToBestOfferCall, RespondToFeedbackCall, RespondToWantItNowPostCall, ReviseCheckoutStatusCall, ReviseInventoryStatusCall, ReviseItemCall, ReviseLiveAuctionItemCall, ReviseMyMessagesCall, ReviseMyMessagesFoldersCall, ReviseSellingManagerInventoryFolderCall, ReviseSellingManagerProductCall, ReviseSellingManagerSaleRecordCall, ReviseSellingManagerTemplateCall, RevokeTokenCall, SaveItemToSellingManagerTemplateCall, SellerReverseDisputeCall, SendInvoiceCall, SetMessagePreferencesCall, SetNotificationPreferencesCall, SetPictureManagerDetailsCall, SetPromotionalSaleCall, SetPromotionalSaleListingsCall, SetSellingManagerFeedbackOptionsCall, SetSellingManagerItemAutomationRuleCall, SetSellingManagerTemplateAutomationRuleCall, SetShippingDiscountProfilesCall, SetStoreCall, SetStoreCategoriesCall, SetStoreCustomPageCall, SetStorePreferencesCall, SetTaxTableCall, SetUserNotesCall, SetUserPreferencesCall, ValidateChallengeInputCall, ValidateTestUserRegistrationCall, VerifyAddItemCall, VerifyAddSecondChanceItemCall, VeROReportItemsCall

public class ApiCall
extends Object

The base class of all API call classes (AddItemCall, GetItemCall, etc). Each ApiCall object requires an ApiContext object to control the common context under which the API call will be made.

View UML diagram of the class.

Title:

Description:

Copyright: Copyright (c) 2004

Company: eBay Inc.


Field Summary
protected  ApiException apiException
          Set the API exception object.
protected  EventListenerList sendReqListeners
           
 
Constructor Summary
ApiCall()
          Constructor.
ApiCall(ApiContext apiContext)
          Constructor.
 
Method Summary
 void addDetailLevel(DetailLevelCodeType detail)
          Add a detail level value to for call object.
 void addSendRequestListener(SendApiRequestListener l)
          Add listner to filter the AbstractRequestType object right before it is sent to eBay server.
 AbstractResponseType execute(AbstractRequestType request)
          Executing the API call.
 AbstractResponseType executeByApiName(String apiName, AbstractRequestType request)
          Executing the API call by providing API name string (e.g., AddItem, GetItem).
 ApiContext getApiContext()
          Get the ApiContext object to be used.
 ApiException getApiException()
          After making the API call, returns the ApiExceptin object of the call.
 BotBlockRequestType getBotBlock()
          Gets the botBlock value for this request.
 CallRetry getCallRetry()
          Get the CallRetry object that is being used.
 DetailLevelCodeType[] getDetailLevel()
          Get the DetailLevels to of the API call.
 boolean getEnableCompression()
          Determine if GZIP or DEFLATE compression is enabled for this ApiCall object.
 String getEndUserIP()
          Gets the endUserIP value for this request.
 ErrorHandlingCodeType getErrorHandling()
          Gets the errorHandling value for this request.
 UUIDType getInvocationID()
          Gets the invocationID value for this request.
 String getMessageID()
          Gets the messageID value for this request.
 String[] getOutputSelector()
          Gets the outputSelector value for this request.
 String getRequestXml()
          After making the API call, returns the SOAP request Xml text.
 AbstractResponseType getResponseObject()
          After calling Execute(), returns the AbstractResponseType object.
 String getResponseXml()
          After making the API call, returns the SOAP response Xml text.
 SiteCodeType getSite()
          Gets the eBay site that is the call is associated with.
 WarningLevelCodeType getWarningLevel()
          Gets the warningLevel value for this request.
 boolean hasError()
          After calling Exceute(), gets if there are errors returned from eBay API server.
 boolean hasWarning()
          After calling Exceute(), gets if there are warnning returned from eBay API server.
 void removeSendRequestListener(SendApiRequestListener l)
          Remove a listener.
 void setApiContext(ApiContext apiContext)
          Set the ApiContext object to be used.
 void setBotBlock(BotBlockRequestType botBlock)
          Sets the botBlock value for this request
 void setCallRetry(CallRetry callRetry)
          Set the CallRetry object to be used.
 void setDetailLevel(DetailLevelCodeType[] detailLevel)
          Set the DetaiLevels of the API call.
 void setEnableCompression(boolean enableCompression)
          Sets to true to enable GZIP or DEFLATE compression for this ApiCall object.
 void setEndUserIP(String endUserIP)
          Sets the endUserIP value for this request
 void setErrorHandling(ErrorHandlingCodeType errorHandling)
          Sets the errorHandling value for this request
 void setInvocationID(UUIDType invocationID)
          Sets the invocationID value for this request
 void setMessageID(String messageID)
          Sets the messageID value for this request
 void setOutputSelector(String[] outputSelector)
          Sets the outputSelector value for this request
 void setSite(SiteCodeType site)
          Sets the eBay site that is the call is associated with.
 void setWarningLevel(WarningLevelCodeType warningLevel)
          Sets the warningLevel value for this request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sendReqListeners

protected EventListenerList sendReqListeners

apiException

protected ApiException apiException
Set the API exception object.

Constructor Detail

ApiCall

public ApiCall()
Constructor. This method will always set the EnableCompression property to true.


ApiCall

public ApiCall(ApiContext apiContext)
Constructor.

Parameters:
apiContext - The ApiContext object for the ApiCall object.
Method Detail

getApiContext

public ApiContext getApiContext()
Get the ApiContext object to be used.

Returns:
The ApiContext object to be used.

setApiContext

public void setApiContext(ApiContext apiContext)
Set the ApiContext object to be used.

Parameters:
apiContext - The ApiContext objec to be set to.

addSendRequestListener

public void addSendRequestListener(SendApiRequestListener l)
Add listner to filter the AbstractRequestType object right before it is sent to eBay server.

Parameters:
l - SendApiRequestListener

removeSendRequestListener

public void removeSendRequestListener(SendApiRequestListener l)
Remove a listener.

Parameters:
l - SendApiRequestListener

getDetailLevel

public DetailLevelCodeType[] getDetailLevel()
Get the DetailLevels to of the API call. DetailLevel controls what fields should be returned by the API call.

Returns:
Array of DetailLevelCodeType.

setDetailLevel

public void setDetailLevel(DetailLevelCodeType[] detailLevel)
Set the DetaiLevels of the API call.

Parameters:
detailLevel - Array of DetailLevels to be set to.

addDetailLevel

public void addDetailLevel(DetailLevelCodeType detail)
Add a detail level value to for call object.

Parameters:
detail - DetailLevelCodeType

getCallRetry

public CallRetry getCallRetry()
Get the CallRetry object that is being used.

Returns:
the CallRetry object.

setCallRetry

public void setCallRetry(CallRetry callRetry)
Set the CallRetry object to be used. CallRetry controls the behaviour of failure-retry. If you set this property, the CallRetry proper of ApiContext will be ignored.

Parameters:
callRetry - The CallRetry object to use.

getApiException

public ApiException getApiException()
After making the API call, returns the ApiExceptin object of the call.

Returns:
the ApiException object if there's failure. Information contained in ApiException object is returned by eBay API server.

hasWarning

public boolean hasWarning()
After calling Exceute(), gets if there are warnning returned from eBay API server.

Returns:
true means warnnings are returned. Use getApiException().getErrors() to find all warnnings.

hasError

public boolean hasError()
After calling Exceute(), gets if there are errors returned from eBay API server.

Returns:
true means errors are returned. Use getApiException().getErrors() to find all errors.

getRequestXml

public String getRequestXml()
After making the API call, returns the SOAP request Xml text.

Returns:
the request SOAP Xml text.

getResponseXml

public String getResponseXml()
After making the API call, returns the SOAP response Xml text. This field is only set if the server returned response SOAP xml.

Returns:
the response SOAP xml text.

getSite

public SiteCodeType getSite()
Gets the eBay site that is the call is associated with.

Returns:
SiteCodeType

getEnableCompression

public boolean getEnableCompression()
Determine if GZIP or DEFLATE compression is enabled for this ApiCall object. This is a thread level property, i.e., all instances of ApiCall or derived classes will share the same copy of EnableCompression for each thread.

Returns:
boolean

setSite

public void setSite(SiteCodeType site)
Sets the eBay site that is the call is associated with. Setting this property will overrides the Site property in ApiCall.ApiContext.

Parameters:
site - SiteCodeType

setEnableCompression

public void setEnableCompression(boolean enableCompression)
Sets to true to enable GZIP or DEFLATE compression for this ApiCall object. This is a thread level property, i.e., all instances of ApiCall or derived classes will share the same copy of EnableCompression for each thread.

Parameters:
enableCompression - boolean

getResponseObject

public AbstractResponseType getResponseObject()
After calling Execute(), returns the AbstractResponseType object. All eBay SOAP API call returne types that are derived from AbstractResponseType. You can cast it back to the concrete response type (e.g., AddItemResponseType, GetItemResponseType).

Returns:
The returned AbstractResponseType object.

execute

public AbstractResponseType execute(AbstractRequestType request)
                             throws ApiException,
                                    SdkSoapException,
                                    SdkException
Executing the API call. This method assumes that the request type name contains the api name. E.g., AddItemRequestType contains "addItem".

Parameters:
request - The request object.
Returns:
The response type that you can cast back to its concrete type.
Throws:
ApiException
SdkSoapException
SdkException

executeByApiName

public AbstractResponseType executeByApiName(String apiName,
                                             AbstractRequestType request)
                                      throws ApiException,
                                             SdkSoapException,
                                             SdkException
Executing the API call by providing API name string (e.g., AddItem, GetItem).

Parameters:
apiName - The name of the API call. e.g., addItem, getItem, etc.
request - The AbstractRequestType object.
Returns:
The AbstractResponseType object.
Throws:
ApiException
SdkSoapException
SdkException

getMessageID

public String getMessageID()
Gets the messageID value for this request.

Returns:
messageID

setMessageID

public void setMessageID(String messageID)
Sets the messageID value for this request

Parameters:
messageID -

getEndUserIP

public String getEndUserIP()
Gets the endUserIP value for this request.

Returns:
endUserIP

setEndUserIP

public void setEndUserIP(String endUserIP)
Sets the endUserIP value for this request

Parameters:
endUserIP -

getErrorHandling

public ErrorHandlingCodeType getErrorHandling()
Gets the errorHandling value for this request.

Returns:
errorHandling

setErrorHandling

public void setErrorHandling(ErrorHandlingCodeType errorHandling)
Sets the errorHandling value for this request

Parameters:
errorHandling -

getInvocationID

public UUIDType getInvocationID()
Gets the invocationID value for this request.

Returns:
invocationID

setInvocationID

public void setInvocationID(UUIDType invocationID)
Sets the invocationID value for this request

Parameters:
invocationID -

getWarningLevel

public WarningLevelCodeType getWarningLevel()
Gets the warningLevel value for this request.

Returns:
warningLevel

setWarningLevel

public void setWarningLevel(WarningLevelCodeType warningLevel)
Sets the warningLevel value for this request

Parameters:
warningLevel -

getBotBlock

public BotBlockRequestType getBotBlock()
Gets the botBlock value for this request.

Returns:
botBlock

setBotBlock

public void setBotBlock(BotBlockRequestType botBlock)
Sets the botBlock value for this request

Parameters:
botBlock -

getOutputSelector

public String[] getOutputSelector()
Gets the outputSelector value for this request.

Returns:
outputSelector

setOutputSelector

public void setOutputSelector(String[] outputSelector)
Sets the outputSelector value for this request

Parameters:
outputSelector -

Changes since
the last release

The information contained in this document is proprietary and confidential. Use of this information and the eBay API requires a Non-Disclosure Agreement (NDA) between the user and eBay Inc. For information regarding a qualifying NDA, contact Developer Relations:developer-relations@ebay.com
© 2004-2006 eBay Inc. All rights reserved.