Subversion Repositories SmartDukaan

Rev

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

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