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