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