Author: hansbak
Date: Wed Apr 7 04:00:18 2010 New Revision: 931425 URL: http://svn.apache.org/viewvc?rev=931425&view=rev Log: Ebaystore: fixed error in createErrorLogMessage method, call to insertErrorMessagesFromEbay service. Modified: ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java Modified: ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java?rev=931425&r1=931424&r2=931425&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java (original) +++ ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java Wed Apr 7 04:00:18 2010 @@ -891,6 +891,8 @@ public class EbayEvents { Map<String,Object> requestParams = UtilHttp.getParameterMap(request); Locale locale = UtilHttp.getLocale(request); String productStoreId = (String) requestParams.get("productStoreId"); + HttpSession session = request.getSession(true); + GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); try { ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator); @@ -924,7 +926,7 @@ public class EbayEvents { feesummary = feesummary + dfee; } } else { - EbayStoreHelper.createErrorLogMessage(dispatcher, productStoreId, resp.getAck().toString(), "Verify Item : verifyItemBeforeAdd", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dispatcher, productStoreId, resp.getAck().toString(), "Verify Item : verifyItemBeforeAdd", resp.getErrors(0).getLongMessage()); } } } Modified: ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java?rev=931425&r1=931424&r2=931425&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java (original) +++ ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java Wed Apr 7 04:00:18 2010 @@ -633,6 +633,7 @@ public class EbayStore { /* Get store output */ public static Map<String,Object> getEbayStoreOutput(DispatchContext dctx, Map<String,Object> context) { Locale locale = (Locale) context.get("locale"); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); Map<String,Object> result = FastMap.newInstance(); StoreType returnedStoreType = null; @@ -647,10 +648,10 @@ public class EbayStore { List<GenericValue> productStoreRoles = delegator.findByAnd("ProductStoreRole", UtilMisc.toMap("productStoreId", context.get("productStoreId").toString(),"roleTypeId","EBAY_ACCOUNT")); if (productStoreRoles.size() != 0) { partyId= (String)productStoreRoles.get(0).get("partyId"); - List<GenericValue> userLogin = delegator.findByAnd("UserLogin", UtilMisc.toMap("partyId", partyId)); - if (userLogin.size() != 0) { - userLoginId = (String)userLogin.get(0).get("userLoginId"); - password = (String)userLogin.get(0).get("currentPassword"); + List<GenericValue> userLogins = delegator.findByAnd("UserLogin", UtilMisc.toMap("partyId", partyId)); + if (userLogins.size() != 0) { + userLoginId = (String)userLogins.get(0).get("userLoginId"); + password = (String)userLogins.get(0).get("currentPassword"); } } @@ -854,7 +855,7 @@ public class EbayStore { result.put("ebayStore", ebayResp); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store : getEbayStoreOutput", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store : getEbayStoreOutput", resp.getErrors(0).getLongMessage()); result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR); result.put(ModelService.ERROR_MESSAGE, resp.getAck().toString() +":"+ resp.getMessage()); } @@ -890,7 +891,7 @@ public class EbayStore { } public static Map<String,Object> retrieveThemeColorSchemeByThemeId(DispatchContext dctx, Map<String,Object> context) { - + GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); Map<String,Object> result = FastMap.newInstance(); @@ -941,7 +942,7 @@ public class EbayStore { } result.put("storeFontScheme", storeColorSchemeMap); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveThemeColorSchemeByThemeId", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveThemeColorSchemeByThemeId", resp.getErrors(0).getLongMessage()); } } } catch (ApiException e) { @@ -955,6 +956,7 @@ public class EbayStore { } public static Map<String,Object> retrievePredesignedLogoOption(DispatchContext dctx, Map<String,Object> context) { + GenericValue userLogin = (GenericValue) context.get("userLogin"); Map<String,Object> result = FastMap.newInstance(); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); @@ -985,7 +987,7 @@ public class EbayStore { result = ServiceUtil.returnSuccess("load store logo data success.."); result.put("storeLogoOptList", logoList); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrievePredesignedLogoOption", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrievePredesignedLogoOption", resp.getErrors(0).getLongMessage()); } } } catch (ApiException e) { @@ -1000,6 +1002,7 @@ public class EbayStore { public static Map<String,Object> retrieveBasicThemeArray(DispatchContext dctx, Map<String,Object> context) { Map<String,Object> result = FastMap.newInstance(); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); GetStoreOptionsRequestType req = null; @@ -1036,7 +1039,7 @@ public class EbayStore { result = ServiceUtil.returnSuccess("load store Basic Theme option data success.."); result.put("storeThemeList", themeList); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveBasicThemeArray", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveBasicThemeArray", resp.getErrors(0).getLongMessage()); } } } catch (ApiException e) { @@ -1051,6 +1054,7 @@ public class EbayStore { public static Map<String,Object> retrieveAdvancedThemeArray(DispatchContext dctx, Map<String,Object> context) { Map<String,Object> result = FastMap.newInstance(); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); GetStoreOptionsRequestType req = null; @@ -1092,7 +1096,7 @@ public class EbayStore { } result.put("storeAdvancedThemeColorOptList", themeColorList); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveAdvancedThemeArray", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveAdvancedThemeArray", resp.getErrors(0).getLongMessage()); } //this.returnedSubscriptionArray = resp.getSubscriptionArray(); } @@ -1108,6 +1112,7 @@ public class EbayStore { public static Map<String,Object> retrieveStoreFontTheme(DispatchContext dctx, Map<String,Object> context) { Map<String,Object> result = FastMap.newInstance(); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); GetStoreOptionsRequestType req = null; @@ -1217,7 +1222,7 @@ public class EbayStore { result = ServiceUtil.returnSuccess("load store Basic Theme option data success.."); result.put("advanceFontTheme", advanceFontTheme); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveStoreFontTheme", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get store option : retrieveStoreFontTheme", resp.getErrors(0).getLongMessage()); } } } catch (ApiException e) { Modified: ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java?rev=931425&r1=931424&r2=931425&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java (original) +++ ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java Wed Apr 7 04:00:18 2010 @@ -872,7 +872,7 @@ public class EbayStoreAutoPreferences { String orderId = resp.getOrderID(); Debug.log(":: new order id is = " + orderId); } else { - EbayStoreHelper.createErrorLogMessage(dispatcher, productStoreId, resp.getAck().toString(), "Add order : runCombineOrders", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dispatcher, productStoreId, resp.getAck().toString(), "Add order : runCombineOrders", resp.getErrors(0).getLongMessage()); } } } @@ -1048,6 +1048,7 @@ public class EbayStoreAutoPreferences { public static Map<String,Object> autoBlockItemsOutOfStock(DispatchContext dctx, Map<String,Object> context) { Locale locale = (Locale) context.get("locale"); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); Map<String,Object> result = FastMap.newInstance(); GetSellingManagerInventoryRequestType req = new GetSellingManagerInventoryRequestType(); @@ -1085,7 +1086,7 @@ public class EbayStoreAutoPreferences { if (tresp != null && "SUCCESS".equals(tresp.getAck().toString())) { result = ServiceUtil.returnSuccess(); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), tresp.getAck().toString(), "Delete selling manager template : autoBlockItemsOutOfStock", tresp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), tresp.getAck().toString(), "Delete selling manager template : autoBlockItemsOutOfStock", tresp.getErrors(0).getLongMessage()); } } } @@ -1093,7 +1094,7 @@ public class EbayStoreAutoPreferences { } result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get selling manager inventory : autoBlockItemsOutOfStock", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "Get selling manager inventory : autoBlockItemsOutOfStock", resp.getErrors(0).getLongMessage()); } result = ServiceUtil.returnSuccess(); } catch (ApiException e) { Modified: ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java?rev=931425&r1=931424&r2=931425&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java (original) +++ ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java Wed Apr 7 04:00:18 2010 @@ -624,6 +624,7 @@ public class EbayStoreHelper { public static Map<String, Object> uploadTrackingInfoBackToEbay(DispatchContext dctx, Map<String, Object> context) { Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); + GenericValue userLogin = (GenericValue) context.get("userLogin"); String productStoreId = (String) context.get("productStoreId"); String orderId = (String) context.get("orderId"); GetOrdersRequestType req = new GetOrdersRequestType(); @@ -693,12 +694,12 @@ public class EbayStoreHelper { if (addResp != null && "SUCCESS".equals(addResp.getAck().toString())) { Debug.log("Upload tracking code to eBay success..."); } else { - createErrorLogMessage(dctx.getDispatcher(), productStoreId, addResp.getAck().toString(), "Update order : uploadTrackingInfoBackToEbay", addResp.getMessage()); + createErrorLogMessage(userLogin, dctx.getDispatcher(), productStoreId, addResp.getAck().toString(), "Update order : uploadTrackingInfoBackToEbay", addResp.getErrors(0).getLongMessage()); } } } } else { - createErrorLogMessage(dctx.getDispatcher(), productStoreId, resp.getAck().toString(), "Get order : uploadTrackingInfoBackToEbay", resp.getMessage()); + createErrorLogMessage(userLogin, dctx.getDispatcher(), productStoreId, resp.getAck().toString(), "Get order : uploadTrackingInfoBackToEbay", resp.getErrors(0).getLongMessage()); } } } @@ -708,7 +709,7 @@ public class EbayStoreHelper { return ServiceUtil.returnSuccess(); } - public static void createErrorLogMessage(LocalDispatcher dispatcher, String productStoreId, String ack, String fuction, String errorMessage) { + public static void createErrorLogMessage(GenericValue userLogin, LocalDispatcher dispatcher, String productStoreId, String ack, String fuction, String errorMessage) { if (!"".equals(productStoreId) && (!"".equals(errorMessage))) { try { Map<String, Object> newMap = FastMap.newInstance(); @@ -717,6 +718,7 @@ public class EbayStoreHelper { newMap.put("functionName", fuction); newMap.put("logMessage", errorMessage); newMap.put("createDatetime", UtilDateTime.nowTimestamp()); + newMap.put("userLogin", userLogin); dispatcher.runSync("insertErrorMessagesFromEbay", newMap); } catch (Exception ex) { Debug.log("Error from create error log messages : "+ex.getMessage()); Modified: ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java?rev=931425&r1=931424&r2=931425&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java (original) +++ ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreInventoryServices.java Wed Apr 7 04:00:18 2010 @@ -66,6 +66,7 @@ public class EbayStoreInventoryServices /*update inventory on ebay site*/ public static Map<String,Object> updateEbayStoreInventory(DispatchContext dctx, Map<String,Object> context) { Map<String,Object> result = FastMap.newInstance(); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); GetSellingManagerInventoryRequestType invenReq = null; @@ -100,7 +101,7 @@ public class EbayStoreInventoryServices } } } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), invenResp.getAck().toString(), "GetSellingManagerInventoryCall : updateEbayStoreInventory", invenResp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), invenResp.getAck().toString(), "GetSellingManagerInventoryCall : updateEbayStoreInventory", invenResp.getErrors(0).getLongMessage()); } // checkProduct is true then update detail but is false do create new one. @@ -133,6 +134,7 @@ public class EbayStoreInventoryServices /* add new product and quantity to ebay inventory */ public static boolean createNewProductInEbayInventoryFolder(DispatchContext dctx, Map<String,Object> context) { + GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); AddSellingManagerProductRequestType productReq = null; @@ -162,7 +164,7 @@ public class EbayStoreInventoryServices ebayProductStoreInventory.put("folderId", folderId); ebayProductStoreInventory.store(); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), productResp.getAck().toString(), "AddSellingManagerProductCall : createNewProductInEbayInventoryFolder", productResp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), productResp.getAck().toString(), "AddSellingManagerProductCall : createNewProductInEbayInventoryFolder", productResp.getErrors(0).getLongMessage()); Debug.logError("Fail to create inventory product ".concat(productId).concat("in productStore ").concat(context.get("productStoreId").toString()).concat(" message from ebay : ").concat(productResp.getMessage()), module); } } @@ -180,6 +182,7 @@ public class EbayStoreInventoryServices /* update product and quantity to ebay inventory */ public static boolean updateProductInEbayInventoryFolder(DispatchContext dctx, Map<String,Object> context) { + GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); ReviseSellingManagerProductRequestType req = null; @@ -217,7 +220,7 @@ public class EbayStoreInventoryServices ebayProductStoreInventory.put("folderId", folderId); ebayProductStoreInventory.store(); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "ReviseSellingManagerProductCall : updateProductInEbayInventoryFolder", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "ReviseSellingManagerProductCall : updateProductInEbayInventoryFolder", resp.getErrors(0).getLongMessage()); Debug.logError("Fail to update inventory product ".concat(productId).concat("in productStore ").concat(context.get("productStoreId").toString()).concat(" message from ebay : ").concat(resp.getMessage()), module); } } @@ -235,6 +238,7 @@ public class EbayStoreInventoryServices public static Map<String,Object> getFolderInEbayStoreInventory(DispatchContext dctx, Map<String,Object> context) { Map<String,Object> result = FastMap.newInstance(); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); GetSellingManagerInventoryFolderRequestType req = null; @@ -263,7 +267,7 @@ public class EbayStoreInventoryServices folderId = createNewFolderInEbayStoreInventory(dctx,context); } } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "GetSellingManagerInventoryFolderCall : getFolderInEbayStoreInventory", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "GetSellingManagerInventoryFolderCall : getFolderInEbayStoreInventory", resp.getErrors(0).getLongMessage()); } result = ServiceUtil.returnSuccess("load ebay store folderId "+folderId+" success.."); } @@ -283,6 +287,7 @@ public class EbayStoreInventoryServices /*create new folder for export product into inventory.*/ public static String createNewFolderInEbayStoreInventory(DispatchContext dctx, Map<String,Object> context) { Locale locale = (Locale) context.get("locale"); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Delegator delegator = dctx.getDelegator(); AddSellingManagerInventoryFolderRequestType req = null; AddSellingManagerInventoryFolderResponseType resp = null; @@ -296,7 +301,7 @@ public class EbayStoreInventoryServices if (resp != null && "SUCCESS".equals(resp.getAck().toString())) { folderId = String.valueOf(resp.getFolderID()); } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "AddSellingManagerInventoryFolderCall : createNewFolderInEbayStoreInventory", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "AddSellingManagerInventoryFolderCall : createNewFolderInEbayStoreInventory", resp.getErrors(0).getLongMessage()); Debug.logError("The problem with create new folder on ebay site.", module); return folderId; } @@ -314,6 +319,7 @@ public class EbayStoreInventoryServices /* update inventory status from ebay store inventory */ public static Map<String,Object> updateEbayInventoryStatusByProductId(DispatchContext dctx, Map<String,Object> context) { Locale locale = (Locale) context.get("locale"); + GenericValue userLogin = (GenericValue) context.get("userLogin"); Map<String,Object> result = FastMap.newInstance(); Delegator delegator = dctx.getDelegator(); String productStoreId = (String)context.get("productStoreId"); @@ -350,7 +356,7 @@ public class EbayStoreInventoryServices } } } else { - EbayStoreHelper.createErrorLogMessage(dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "GetSellingManagerInventoryCall : updateEbayInventoryStatusByProductId", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dctx.getDispatcher(), context.get("productStoreId").toString(), resp.getAck().toString(), "GetSellingManagerInventoryCall : updateEbayInventoryStatusByProductId", resp.getErrors(0).getLongMessage()); Debug.logError("The problem with get manage inventory detail from ebay site.", module); } } Modified: ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java?rev=931425&r1=931424&r2=931425&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java (original) +++ ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java Wed Apr 7 04:00:18 2010 @@ -70,6 +70,8 @@ public class EbayStoreOptions { public static String retrieveThemeColorSchemeByThemeId(HttpServletRequest request, HttpServletResponse response) { Locale locale = UtilHttp.getLocale(request); + HttpSession session = request.getSession(true); + GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); Delegator delegator = (Delegator) request.getAttribute("delegator"); LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); GetStoreOptionsRequestType req = null; @@ -129,7 +131,7 @@ public class EbayStoreOptions { i++; } } else { - EbayStoreHelper.createErrorLogMessage(dispatcher, paramMap.get("productStoreId").toString(), resp.getAck().toString(), "GetStoreOptionsCall : retrieveThemeColorSchemeByThemeId", resp.getMessage()); + EbayStoreHelper.createErrorLogMessage(userLogin, dispatcher, paramMap.get("productStoreId").toString(), resp.getAck().toString(), "GetStoreOptionsCall : retrieveThemeColorSchemeByThemeId", resp.getErrors(0).getLongMessage()); } } } catch (ApiException e) { |
Free forum by Nabble | Edit this page |