Subversion Repositories SmartDukaan

Rev

Rev 832 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 832 Rev 843
Line 27... Line 27...
27
	 */
27
	 */
28
	private static Logger log = Logger.getLogger(Class.class);	
28
	private static Logger log = Logger.getLogger(Class.class);	
29
	private String id;
29
	private String id;
30
	private long itemId;
30
	private long itemId;
31
	private String pincode;
31
	private String pincode;
32
	private long days = 0;
32
	private long days = -1;
33
	public EstimateController() {
33
	public EstimateController() {
34
		super();
34
		super();
35
	}
35
	}
36
    
36
    
37
    // GET /logout
37
    // GET /logout
Line 41... Line 41...
41
			logisticsServiceClient = new LogisticsServiceClient();
41
			logisticsServiceClient = new LogisticsServiceClient();
42
			Client logisticsClient = logisticsServiceClient.getClient();
42
			Client logisticsClient = logisticsServiceClient.getClient();
43
			days = logisticsClient.getLogisticsEstimation(itemId, pincode).getDeliveryTime();
43
			days = logisticsClient.getLogisticsEstimation(itemId, pincode).getDeliveryTime();
44
			
44
			
45
    	}catch (LogisticsServiceException e) {
45
    	}catch (LogisticsServiceException e) {
46
    		days = 0;
46
    		days = -1;
47
    		log.error(e.getMessage());
47
    		log.error(e.getMessage());
48
    		e.printStackTrace();
48
    		e.printStackTrace();
49
		}catch(TException e){
49
		}catch(TException e){
50
			
50
			
51
		}
51
		}