Subversion Repositories SmartDukaan

Rev

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

Rev 10254 Rev 10409
Line 249... Line 249...
249
			}
249
			}
250
			try {
250
			try {
251
 
251
 
252
				hwb.write(fileOut);
252
				hwb.write(fileOut);
253
			} catch (IOException e) {
253
			} catch (IOException e) {
254
				// TODO Auto-generated catch block
-
 
255
				e.printStackTrace();
254
				e.printStackTrace();
256
			}
255
			}
257
			HttpPost post = new HttpPost("http://seller.snapdeal.com/pricing/upload");
256
			HttpPost post = new HttpPost("http://seller.snapdeal.com/pricing/upload?uploadType=SP");
258
			File file = new File(SNAPDEAL_PRICING_SHEET);
257
			File file = new File(SNAPDEAL_PRICING_SHEET);
259
			MultipartEntity mpEntity = new MultipartEntity();
258
			MultipartEntity mpEntity = new MultipartEntity();
260
			ContentBody cbFile = new FileBody(file,"application/vnd.ms-excel");
259
			ContentBody cbFile = new FileBody(file,"application/vnd.ms-excel");
261
			mpEntity.addPart("file", cbFile);
260
			mpEntity.addPart("file", cbFile);
262
			post.setEntity(mpEntity);
261
			post.setEntity(mpEntity);
Line 273... Line 272...
273
			try {
272
			try {
274
				while ((line = rd.readLine()) != null) {
273
				while ((line = rd.readLine()) != null) {
275
					feedresponse = line;
274
					feedresponse = line;
276
				}
275
				}
277
			} catch (IOException e) {
276
			} catch (IOException e) {
278
				// TODO Auto-generated catch block
-
 
279
				e.printStackTrace();
277
				e.printStackTrace();
280
			}
278
			}
281
			int retry = 5;
279
			int retry = 5;
282
			boolean exitfetchinghistory;
280
			boolean exitfetchinghistory;
283
			int successfullyUpdated;
281
			int successfullyUpdated;
Line 360... Line 358...
360
 
358
 
361
				System.out.println("SKUs not updated");
359
				System.out.println("SKUs not updated");
362
				try {
360
				try {
363
					mailer.sendSSLMessage(sendTo,"Snapdeal Item Prices were not updated "+ sdf.format(System.currentTimeMillis()),emailFromAddress, password, text);
361
					mailer.sendSSLMessage(sendTo,"Snapdeal Item Prices were not updated "+ sdf.format(System.currentTimeMillis()),emailFromAddress, password, text);
364
				} catch (MessagingException e) {
362
				} catch (MessagingException e) {
365
					// TODO Auto-generated catch block
-
 
366
					e.printStackTrace();
363
					e.printStackTrace();
367
				}
364
				}
368
 
365
 
369
			}
366
			}
370
			if(updatedSkuMap.size()>0){
367
			if(updatedSkuMap.size()>0){