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