Subversion Repositories SmartDukaan

Rev

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

Rev 10049 Rev 10148
Line 108... Line 108...
108
	}
108
	}
109
 
109
 
110
	public static void main(String[] args) throws ClientProtocolException, TException{
110
	public static void main(String[] args) throws ClientProtocolException, TException{
111
		DefaultHttpClient httpclient = new DefaultHttpClient();
111
		DefaultHttpClient httpclient = new DefaultHttpClient();
112
		httpclient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpclient);
112
		httpclient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpclient);
113
		/*httpclient.getCredentialsProvider().setCredentials(
113
		httpclient.getCredentialsProvider().setCredentials(
114
				new AuthScope("sandbox-api.flipkart.net", 443),
114
				new AuthScope("sandbox-api.flipkart.net", 443),
115
				new UsernamePasswordCredentials("og3yg5994bxbxxc1", "8a137068-417c-4e4f-ae95-9295ab938d88"));/// Test Server Access Keys
115
				new UsernamePasswordCredentials("og3yg5994bxbxxc1", "8a137068-417c-4e4f-ae95-9295ab938d88"));/// Test Server Access Keys
116
		 */
-
 
117
		httpclient.getCredentialsProvider().setCredentials(
116
		//httpclient.getCredentialsProvider().setCredentials(
118
				new AuthScope("api.flipkart.net", 443),
117
		//		new AuthScope("api.flipkart.net", 443),
119
				new UsernamePasswordCredentials("m2z93iskuj81qiid","0c7ab6a5-98c0-4cdc-8be3-72c591e0add4")); //Prod Server Access Keys
118
		//		new UsernamePasswordCredentials("m2z93iskuj81qiid","0c7ab6a5-98c0-4cdc-8be3-72c591e0add4")); //Prod Server Access Keys
120
		HttpPost httppost = new HttpPost("https://api.flipkart.net/sellers/skus/listings/bulk"); // PROD
119
		//HttpPost httppost = new HttpPost("https://api.flipkart.net/sellers/skus/listings/bulk"); // PROD
121
		//HttpPost httppost = new HttpPost("https://sandbox-api.flipkart.net/sellers/skus/listings/bulk"); // TEST
120
		HttpPost httppost = new HttpPost("https://sandbox-api.flipkart.net/sellers/skus/listings/bulk"); // TEST
122
		StringBuffer jsonRequest = new StringBuffer();
121
		StringBuffer jsonRequest = new StringBuffer();
123
		StringBuffer jsonStart = new StringBuffer();
122
		StringBuffer jsonStart = new StringBuffer();
124
		jsonStart = jsonStart.append("{\"listings\":[");
123
		jsonStart = jsonStart.append("{\"listings\":[");
125
		StringBuffer jsonEnd = new StringBuffer();
124
		StringBuffer jsonEnd = new StringBuffer();
126
		jsonEnd.append("]}");
125
		jsonEnd.append("]}");