Subversion Repositories SmartDukaan

Rev

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

Rev 9950 Rev 9951
Line 94... Line 94...
94
 
94
 
95
	public static void main(String[] args) throws ClientProtocolException, IOException,TException{
95
	public static void main(String[] args) throws ClientProtocolException, IOException,TException{
96
		calculateinventory();
96
		calculateinventory();
97
		DefaultHttpClient httpclient = new DefaultHttpClient();
97
		DefaultHttpClient httpclient = new DefaultHttpClient();
98
		httpclient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpclient);
98
		httpclient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpclient);
99
		//httpclient.getCredentialsProvider().setCredentials(
-
 
100
		//		new AuthScope("sandbox-api.flipkart.net", 443),
-
 
101
		//		new UsernamePasswordCredentials("og3yg5994bxbxxc1", "8a137068-417c-4e4f-ae95-9295ab938d88"));
-
 
102
		httpclient.getCredentialsProvider().setCredentials(
99
		httpclient.getCredentialsProvider().setCredentials(
103
				new AuthScope("sandbox-api.flipkart.net", 443),
100
				new AuthScope("sandbox-api.flipkart.net", 443),
-
 
101
				new UsernamePasswordCredentials("og3yg5994bxbxxc1", "8a137068-417c-4e4f-ae95-9295ab938d88"));
-
 
102
		//httpclient.getCredentialsProvider().setCredentials(
-
 
103
		//		new AuthScope("sandbox-api.flipkart.net", 443),
104
				new UsernamePasswordCredentials("m2z93iskuj81qiid","0c7ab6a5-98c0-4cdc-8be3-72c591e0add4"));
104
		//		new UsernamePasswordCredentials("m2z93iskuj81qiid","0c7ab6a5-98c0-4cdc-8be3-72c591e0add4"));
105
		HttpPost httppost = new HttpPost("https://sandbox-api.flipkart.net/sellers/skus/listings/bulk");
105
		HttpPost httppost = new HttpPost("https://sandbox-api.flipkart.net/sellers/skus/listings/bulk");
106
		StringBuffer jsonRequest = new StringBuffer();
106
		StringBuffer jsonRequest = new StringBuffer();
107
		jsonRequest.append("{\"listings\":[");
107
		jsonRequest.append("{\"listings\":[");
108
		//System.out.println("JSON request  " + jsonRequest);
108
		//System.out.println("JSON request  " + jsonRequest);
109
		LogisticsClient logisticsServiceClient;
109
		LogisticsClient logisticsServiceClient;