Subversion Repositories SmartDukaan

Rev

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

Rev 2949 Rev 3126
Line 5... Line 5...
5
 
5
 
6
import java.util.StringTokenizer;
6
import java.util.StringTokenizer;
7
 
7
 
8
import in.shop2020.logistics.LogisticsService.Client;
8
import in.shop2020.logistics.LogisticsService.Client;
9
import in.shop2020.logistics.LogisticsServiceException;
9
import in.shop2020.logistics.LogisticsServiceException;
10
import in.shop2020.thrift.clients.LogisticsServiceClient;
10
import in.shop2020.thrift.clients.LogisticsClient;
11
 
11
 
12
import org.apache.log4j.Logger;
12
import org.apache.log4j.Logger;
13
import org.apache.struts2.rest.DefaultHttpHeaders;
13
import org.apache.struts2.rest.DefaultHttpHeaders;
14
import org.apache.struts2.rest.HttpHeaders;
14
import org.apache.struts2.rest.HttpHeaders;
15
import org.apache.thrift.TException;
15
import org.apache.thrift.TException;
Line 31... Line 31...
31
		super();
31
		super();
32
	}
32
	}
33
    
33
    
34
    // GET /logout
34
    // GET /logout
35
    public HttpHeaders show(){
35
    public HttpHeaders show(){
36
    	LogisticsServiceClient logisticsServiceClient = null;
36
    	LogisticsClient logisticsServiceClient = null;
37
    	try {
37
    	try {
38
			logisticsServiceClient = new LogisticsServiceClient();
38
			logisticsServiceClient = new LogisticsClient();
39
			Client logisticsClient = logisticsServiceClient.getClient();
39
			Client logisticsClient = logisticsServiceClient.getClient();
40
			days = logisticsClient.getLogisticsEstimation(itemId, pincode).getDeliveryTime();
40
			days = logisticsClient.getLogisticsEstimation(itemId, pincode).getDeliveryTime();
41
			
41
			
42
    	}catch (LogisticsServiceException e) {
42
    	}catch (LogisticsServiceException e) {
43
    		days = -1;
43
    		days = -1;