Subversion Repositories SmartDukaan

Rev

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

Rev 10049 Rev 10051
Line 130... Line 130...
130
 
130
 
131
	public static void main(String[] args) throws ClientProtocolException, TException{
131
	public static void main(String[] args) throws ClientProtocolException, TException{
132
		calculateinventory();
132
		calculateinventory();
133
		DefaultHttpClient httpclient = new DefaultHttpClient();
133
		DefaultHttpClient httpclient = new DefaultHttpClient();
134
		httpclient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpclient);
134
		httpclient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpclient);
-
 
135
		//httpclient.getCredentialsProvider().setCredentials(
-
 
136
		//		new AuthScope("sandbox-api.flipkart.net", 443),
-
 
137
		//		new UsernamePasswordCredentials("og3yg5994bxbxxc1", "8a137068-417c-4e4f-ae95-9295ab938d88"));/// Test Server Access Keys
135
		httpclient.getCredentialsProvider().setCredentials(
138
		httpclient.getCredentialsProvider().setCredentials(
136
				new AuthScope("sandbox-api.flipkart.net", 443),
-
 
137
				new UsernamePasswordCredentials("og3yg5994bxbxxc1", "8a137068-417c-4e4f-ae95-9295ab938d88"));/// Test Server Access Keys
-
 
138
		/*httpclient.getCredentialsProvider().setCredentials(
-
 
139
				new AuthScope("api.flipkart.net", 443),
139
				new AuthScope("api.flipkart.net", 443),
140
				new UsernamePasswordCredentials("m2z93iskuj81qiid","0c7ab6a5-98c0-4cdc-8be3-72c591e0add4")); //Prod Server Access Keys
140
				new UsernamePasswordCredentials("m2z93iskuj81qiid","0c7ab6a5-98c0-4cdc-8be3-72c591e0add4")); //Prod Server Access Keys
141
		*///HttpPost httppost = new HttpPost("https://api.flipkart.net/sellers/skus/listings/bulk"); // PROD
141
		HttpPost httppost = new HttpPost("https://api.flipkart.net/sellers/skus/listings/bulk"); // PROD
142
		HttpPost httppost = new HttpPost("https://sandbox-api.flipkart.net/sellers/skus/listings/bulk"); // TEST
142
		//HttpPost httppost = new HttpPost("https://sandbox-api.flipkart.net/sellers/skus/listings/bulk"); // TEST
143
		StringBuffer jsonRequest = new StringBuffer();
143
		StringBuffer jsonRequest = new StringBuffer();
144
		StringBuffer jsonStart = new StringBuffer();
144
		StringBuffer jsonStart = new StringBuffer();
145
		jsonStart = jsonStart.append("{\"listings\":[");
145
		jsonStart = jsonStart.append("{\"listings\":[");
146
		StringBuffer jsonEnd = new StringBuffer();
146
		StringBuffer jsonEnd = new StringBuffer();
147
		jsonEnd.append("]}");
147
		jsonEnd.append("]}");