if (req != null && actionCode != null) {
req.setAction(actionCode);
resp = (SetStoreCategoriesResponseType) call.execute(req);
if (resp != null && "SUCCESS".equals(resp.getAck().toString())) {
long returnTaskId = resp.getTaskID() == null? 0: resp.getTaskID().longValue();
TaskStatusCodeType returnedStatus = resp.getStatus();
StoreCustomCategoryArrayType returnedCustomCategory = resp.getCustomCategory();
if (actionCode.equals(StoreCategoryUpdateActionCodeType.ADD) && returnedCustomCategory != null) {
StoreCustomCategoryType[] returnCategoryTypeList = returnedCustomCategory.getCustomCategory();
for (StoreCustomCategoryType returnCategoryType : returnCategoryTypeList) {
List<GenericValue> productCategoryList = delegator.findByAnd("ProductCategory", UtilMisc.toMap("categoryName",returnCategoryType.getName(),"productCategoryTypeId","EBAY_CATEGORY"));