Subversion Repositories SmartDukaan

Rev

Rev 11949 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11949 Rev 12409
Line 1153... Line 1153...
1153
			
1153
			
1154
			
1154
			
1155
			List<File> files = new ArrayList<File>();
1155
			List<File> files = new ArrayList<File>();
1156
			files.add(file);
1156
			files.add(file);
1157
 
1157
 
1158
			mailer.sendSSLMessage(sendTo,
-
 
1159
					"Inventory not Sent due to NLC Limitaion in case of - "
-
 
1160
					+ fileName, "Please find attached file.",
-
 
1161
					emailFromAddress, password, "/tmp/" + fileName + "-leftOutInv.xls", "/tmp/"+fileName+"-leftOutInv-file.htm");
1158
			mailer.sendSSLMessage(sendTo,"Inventory not Sent due to NLC Limitaion in case of - "+ fileName, "Please find attached file.",emailFromAddress, password, "/tmp/" + fileName + "-leftOutInv.xls", "/tmp/"+fileName+"-leftOutInv-file.htm");
1162
			/*mailer.sendSSLMessage(sendTo,
1159
			/*mailer.sendSSLMessage(sendTo,
1163
					"Inventory not Sent due to NLC Limitaion in case of - "
1160
					"Inventory not Sent due to NLC Limitaion in case of - "
1164
							+ fileName, "Please find attached file.",
1161
							+ fileName, "Please find attached file.",
1165
					emailFromAddress, password, files);*/
1162
					emailFromAddress, password, files);*/
1166
		} catch (Exception e) {
1163
		} catch (Exception e) {
Line 1180... Line 1177...
1180
	public static void main(String[] args) throws Exception {
1177
	public static void main(String[] args) throws Exception {
1181
		calculateinventory();
1178
		calculateinventory();
1182
		createAndSendLeftOutInventoryFile(nlcLoiItemsMapSD, "SNAPDEAL");
1179
		createAndSendLeftOutInventoryFile(nlcLoiItemsMapSD, "SNAPDEAL");
1183
		createAndSendLeftOutInventoryFile(nlcLoiItemsMapFK, "FLIPKART");
1180
		createAndSendLeftOutInventoryFile(nlcLoiItemsMapFK, "FLIPKART");
1184
 
1181
 
1185
		/*
-
 
1186
		 * HttpPost post = new
-
 
1187
		 * HttpPost("http://selleraccounts.snapdeal.com/keymaker/login");
-
 
1188
		 * HttpGet get = new HttpGet(
-
 
1189
		 * "http://seller.snapdeal.com/pricing/search?gridType=normal&_search=false&nd=1392188583467&rows=30&page=1&sidx=&sord=asc"
-
 
1190
		 * ); BufferedReader rd= null; List<NameValuePair> nameValuePairs = new
-
 
1191
		 * ArrayList<NameValuePair>(); nameValuePairs.add(new
-
 
1192
		 * BasicNameValuePair("username", "khushal.bhatia@saholic.com"));
-
 
1193
		 * nameValuePairs.add(new BasicNameValuePair("password", "sonline"));
-
 
1194
		 * nameValuePairs.add(new BasicNameValuePair("lt",
-
 
1195
		 * "LT-14717-oFCLyRTRMWfMDeczgXm0aaufUjfwPV")); nameValuePairs.add(new
-
 
1196
		 * BasicNameValuePair("execution", "e1s1")); nameValuePairs.add(new
-
 
1197
		 * BasicNameValuePair("_eventId", "submit")); nameValuePairs.add(new
-
 
1198
		 * BasicNameValuePair("submit", "LOGIN")); //post.setEntity(new
-
 
1199
		 * UrlEncodedFormEntity(nameValuePairs,"utf-8"));
-
 
1200
		 * 
-
 
1201
		 * HttpResponse response = null; try { response = client.execute(post);
-
 
1202
		 * } catch (ClientProtocolException e) { // TODO Auto-generated catch
-
 
1203
		 * block e.printStackTrace(); } catch (IOException e) { // TODO
-
 
1204
		 * Auto-generated catch block e.printStackTrace(); }
-
 
1205
		 * 
-
 
1206
		 * try { rd = new BufferedReader(new
-
 
1207
		 * InputStreamReader(response.getEntity().getContent())); } catch
-
 
1208
		 * (IllegalStateException e1) { // TODO Auto-generated catch block
-
 
1209
		 * e1.printStackTrace(); } catch (IOException e1) { // TODO
-
 
1210
		 * Auto-generated catch block e1.printStackTrace(); } String line = "";
-
 
1211
		 * try { while ((line = rd.readLine()) != null) {
-
 
1212
		 * System.out.println(line); } } catch (IOException e) { // TODO
-
 
1213
		 * Auto-generated catch block e.printStackTrace(); }
-
 
1214
		 * 
-
 
1215
		 * for(Header h: response.getAllHeaders()){
-
 
1216
		 * System.out.println(h.getName()+" "+h.getValue()); }
-
 
1217
		 * 
-
 
1218
		 * 
-
 
1219
		 * try { response = client.execute(get); } catch
-
 
1220
		 * (ClientProtocolException e) { // TODO Auto-generated catch block
-
 
1221
		 * e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated
-
 
1222
		 * catch block e.printStackTrace(); }
-
 
1223
		 * 
-
 
1224
		 * try { rd = new BufferedReader(new
-
 
1225
		 * InputStreamReader(response.getEntity().getContent())); } catch
-
 
1226
		 * (IllegalStateException e1) { // TODO Auto-generated catch block
-
 
1227
		 * e1.printStackTrace(); } catch (IOException e1) { // TODO
-
 
1228
		 * Auto-generated catch block e1.printStackTrace(); }
-
 
1229
		 * 
-
 
1230
		 * System.out.println("Get Response for Get Request");
-
 
1231
		 * 
-
 
1232
		 * try { while ((line = rd.readLine()) != null) {
-
 
1233
		 * System.out.println(line); } } catch (IOException e) { // TODO
-
 
1234
		 * Auto-generated catch block e.printStackTrace(); }
-
 
1235
		 */
-
 
1236
 
-
 
1237
	}
1182
	}
1238
}
1183
}
1239
1184