Subversion Repositories SmartDukaan

Rev

Rev 10190 | Rev 11672 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10190 Rev 10195
Line 299... Line 299...
299
    	List<ItemText> itemTexts = null; 
299
    	List<ItemText> itemTexts = null; 
300
    	try {
300
    	try {
301
    		LogisticsClient cl = new LogisticsClient();
301
    		LogisticsClient cl = new LogisticsClient();
302
            LogisticsService.Client client = cl.getClient();
302
            LogisticsService.Client client = cl.getClient();
303
            itemTexts = client.getEntityLogisticsEstimation(productId, DEFAULT_PINCODE, DeliveryType.PREPAID );
303
            itemTexts = client.getEntityLogisticsEstimation(productId, DEFAULT_PINCODE, DeliveryType.PREPAID );
-
 
304
            if(itemTexts!=null){
-
 
305
            	List<Long> items = new ArrayList<Long>();
-
 
306
            	for(ItemText itemText : itemTexts) {
-
 
307
            		items.add(itemText.getItemId());
-
 
308
            	}
-
 
309
            	return new Gson().toJson(items);
-
 
310
            }
304
        } catch (Exception e1) {
311
        } catch (Exception e1) {
305
            log.error("Unable to get items for productId: "+  productId, e1);
312
            log.error("Unable to get items for productId: "+  productId, e1);
306
        }
313
        }
307
        List<Long> items = new ArrayList<Long>();
-
 
308
        for(ItemText itemText : itemTexts) {
-
 
309
        	items.add(itemText.getItemId());
314
        return "[]";
310
        }
315
        
311
        return new Gson().toJson(items);
-
 
312
    }
316
    }
313
    
317
    
314
    private static void setRetargettingLabel() {
318
    private static void setRetargettingLabel() {
315
    	label.put((long) 1002160, "6EIBCKjf1wMQ6Pua0wM"); //Samsung Galaxy Y S5360
319
    	label.put((long) 1002160, "6EIBCKjf1wMQ6Pua0wM"); //Samsung Galaxy Y S5360
316
    	label.put((long) 1002106, "JFGVCKCt8gMQ6Pua0wM"); //Sony Ericsson Xperia Neo V MT11i
320
    	label.put((long) 1002106, "JFGVCKCt8gMQ6Pua0wM"); //Sony Ericsson Xperia Neo V MT11i