Subversion Repositories SmartDukaan

Rev

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

Rev 649 Rev 762
Line 32... Line 32...
32
		super();
32
		super();
33
	}
33
	}
34
    
34
    
35
    // GET /logout
35
    // GET /logout
36
    public HttpHeaders show() throws Exception {
36
    public HttpHeaders show() throws Exception {
37
    	LogisticsServiceClient logisticsServiceClient;
37
    	LogisticsServiceClient logisticsServiceClient = null;
38
    	try {
38
    	try {
39
			logisticsServiceClient = new LogisticsServiceClient();
39
			logisticsServiceClient = new LogisticsServiceClient();
40
			Client logisticsClient = logisticsServiceClient.getClient();
40
			Client logisticsClient = logisticsServiceClient.getClient();
41
			days = logisticsClient.getLogisticsEstimation(itemId, pincode).getDeliveryTime();
41
			days = logisticsClient.getLogisticsEstimation(itemId, pincode).getDeliveryTime();
-
 
42
			
42
		} catch (Exception e) {
43
		} catch (Exception e) {
43
			// TODO Auto-generated catch block
44
			// TODO Auto-generated catch block
44
			e.printStackTrace();
45
			e.printStackTrace();
-
 
46
		} finally{
-
 
47
			if( logisticsServiceClient != null ) {
-
 
48
				logisticsServiceClient.closeConnection();
-
 
49
			}
45
		}    	
50
		}
46
    	return new DefaultHttpHeaders("index");
51
    	return new DefaultHttpHeaders("index");
47
    }
52
    }
48
        
53
        
49
    /**
54
    /**
50
     * 
55
     *