Index: murachi/src/main/java/ve/gob/cenditel/murachi/MurachiRESTWS.java
===================================================================
--- murachi/src/main/java/ve/gob/cenditel/murachi/MurachiRESTWS.java	(revision 8105f090c83c279d19a298b850a50ceaf59a5109)
+++ murachi/src/main/java/ve/gob/cenditel/murachi/MurachiRESTWS.java	(revision f346e176e8c2d042676b2338f41f6fe58e030747)
@@ -127,6 +127,6 @@
 	
 	// debe colocarse la barra al final de la ruta
-	private static final String SERVER_UPLOAD_LOCATION_FOLDER = "/tmp/murachi/";
-	//private static final String SERVER_UPLOAD_LOCATION_FOLDER = "/var/lib/tomcat7/murachiWorkingDirectory/";
+	//private static final String SERVER_UPLOAD_LOCATION_FOLDER = "/tmp/murachi/";
+	private static final String SERVER_UPLOAD_LOCATION_FOLDER = "/var/lib/tomcat7/murachiWorkingDirectory/";
 		
 	private static final String SHA256_MESSAGE_DIGEST = "SHA256";
@@ -276,5 +276,5 @@
 		if (uploadedInputStream == null) {
 			System.out.println("uploadedInputStream == null");
-			logger.error("uploadedInputStream != null. datos recibidos del formulario son nulos.");
+			logger.error("uploadedInputStream == null. datos recibidos del formulario son nulos.");
 			//throw new MurachiException("uploadedInputStream != null. datos recibidos del formulario son nulos.");
 			
@@ -1138,5 +1138,5 @@
 		System.out.println("Signed on: " + date_format.format(pkcs7.getSignDate().getTime()));
 		integrityMap.put("signedOn", date_format.format(pkcs7.getSignDate().getTime()).toString());
-		
+		/*
 		if (pkcs7.getTimeStampDate() != null) {
 			System.out.println("TimeStamp: " + date_format.format(pkcs7.getTimeStampDate().getTime()));
@@ -1157,4 +1157,32 @@
 			integrityMap.put("timeStampVerified", "null");
 		}
+		*/
+		if (pkcs7.getTimeStampDate() != null) {
+			System.out.println("TimeStamp: " + date_format.format(pkcs7.getTimeStampDate().getTime()));
+			integrityMap.put("timeStamp", date_format.format(pkcs7.getTimeStampDate().getTime()).toString());
+			//TimeStampToken ts = pkcs7.getTimeStampToken();
+			//System.out.println("TimeStamp service: " + ts.getTimeStampInfo().getTsa());
+			//integrityMap.put("timeStampService", ts.getTimeStampInfo().getTsa().toString());
+			System.out.println("Timestamp verified? " + pkcs7.verifyTimestampImprint());
+			integrityMap.put("timeStampVerified", Boolean.toString(pkcs7.verifyTimestampImprint()));
+		}else{
+			System.out.println("TimeStamp: " + "null");
+			integrityMap.put("timeStamp", "null");
+			
+			//System.out.println("TimeStamp service: " + "null");
+			//integrityMap.put("timeStampService", "null");
+			
+			System.out.println("Timestamp verified?: " + "null");
+			integrityMap.put("timeStampVerified", "null");
+		}
+		if (pkcs7.getTimeStampToken().getTimeStampInfo().getTsa() != null) {
+			TimeStampToken ts = pkcs7.getTimeStampToken();
+			System.out.println("TimeStamp service: " + ts.getTimeStampInfo().getTsa());
+			integrityMap.put("timeStampService", ts.getTimeStampInfo().getTsa().toString());
+		}else{
+			System.out.println("TimeStamp service: " + "null");
+			integrityMap.put("timeStampService", "null");
+		}
+		
 		
 		System.out.println("Location: " + pkcs7.getLocation());
@@ -1703,4 +1731,7 @@
 			session.setAttribute("fileId", fileId);
 			
+			logger.debug("***** session: " + session.getId());
+			
+			
 			presignHash.setHash(hashToSign);
 			presignHash.setError("");
@@ -1943,4 +1974,6 @@
 		HttpSession session = req.getSession(false);
 		
+		logger.debug("***** session: " + session.getId());
+		
 		if (session == null) {
 			// registrar error de firma en estadisticas
@@ -2176,5 +2209,5 @@
 		Container container = null;
 		
-		Configuration configuration = new Configuration(Configuration.Mode.PROD);
+		Configuration configuration = new Configuration(Configuration.Mode.TEST);
 		
 		configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
@@ -2236,7 +2269,7 @@
 			jsonSignatures.put("numberOfSignatures", numberOfSignatures);
 			
-			System.out.println("->container.validate()");
+			System.out.println("*********************->container.validate()");
 			ValidationResult validationResult = container.validate();
-			System.out.println("...container.validate()");
+			System.out.println("*********************...container.validate()");
 			
 			
@@ -2315,5 +2348,5 @@
 		//Container container = null;
 		
-		Configuration configuration = new Configuration(Configuration.Mode.PROD);
+		Configuration configuration = new Configuration(Configuration.Mode.TEST);
 		
 		configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
@@ -2707,5 +2740,5 @@
 			Container container = null;
 		
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 		
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
@@ -3350,5 +3383,5 @@
 	    	Security.addProvider(new BouncyCastleProvider());
 						
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -3454,5 +3487,5 @@
 			Container container = null;
 			
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -3574,5 +3607,5 @@
 			Container container = null;
 			
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -3712,5 +3745,5 @@
 	    	Security.addProvider(new BouncyCastleProvider());
 						
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -3837,5 +3870,5 @@
 	    	Security.addProvider(new BouncyCastleProvider());
 						
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -3936,5 +3969,5 @@
 	    	Security.addProvider(new BouncyCastleProvider());
 						
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -4084,5 +4117,5 @@
 	    	Security.addProvider(new BouncyCastleProvider());
 						
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -4370,5 +4403,5 @@
 			Container container = null;
 		
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);
 		
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
@@ -4422,5 +4455,5 @@
 			Container container = null;			
 		
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);		
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);		
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -4651,5 +4684,5 @@
 		        //Configuration configuration = initConfig(); // also need to re-initialize configuration settings
 		        
-		        Configuration configuration = new Configuration(Configuration.Mode.PROD);		
+		        Configuration configuration = new Configuration(Configuration.Mode.TEST);		
 		    	configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 		    	configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);        
@@ -4709,5 +4742,5 @@
 			
 			// abrir el contenedor
-			Configuration configuration = new Configuration(Configuration.Mode.PROD);			
+			Configuration configuration = new Configuration(Configuration.Mode.TEST);			
 			configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);			
@@ -4786,5 +4819,5 @@
 		Container container = null;
 		
-		Configuration configuration = new Configuration(Configuration.Mode.PROD);
+		Configuration configuration = new Configuration(Configuration.Mode.TEST);
 	
 		configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
@@ -4811,5 +4844,5 @@
 		Container container = null;
 		
-		Configuration configuration = new Configuration(Configuration.Mode.PROD);	
+		Configuration configuration = new Configuration(Configuration.Mode.TEST);	
 		configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 		configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -5184,5 +5217,5 @@
 
 			  //Configuration configuration = initConfig(); // also need to re-initialize configuration settings
-			  Configuration configuration = new Configuration(Configuration.Mode.PROD);		
+			  Configuration configuration = new Configuration(Configuration.Mode.TEST);		
 			  configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
 			  configuration.setTslLocation(DIGIDOC4J_TSL_LOCATION);
@@ -5484,5 +5517,5 @@
 			        //Configuration configuration = initConfig(); // also need to re-initialize configuration settings
 			        
-			        Configuration configuration = new Configuration(Configuration.Mode.PROD);		
+			        Configuration configuration = new Configuration(Configuration.Mode.TEST);		
 			    	configuration.loadConfiguration("/tmp/digidoc4j.yaml");
 			    	configuration.setTslLocation("file:///tmp/venezuela-tsl.xml");        
@@ -6011,5 +6044,5 @@
 		Security.addProvider(new BouncyCastleProvider());
 		
-		Configuration configuration = new Configuration(Configuration.Mode.PROD);
+		Configuration configuration = new Configuration(Configuration.Mode.TEST);
 		
 		configuration.loadConfiguration("/tmp/digidoc4j.yaml");
@@ -6026,5 +6059,5 @@
 	    container.setSignatureProfile(SignatureProfile.B_BES);
 	    container.addDataFile("/tmp/salida.txt", "text/plain");
-	    container.sign(new PKCS12Signer("/tmp/tibisay.p12", "123456".toCharArray()));
+	    container.sign(new PKCS12Signer("/tmp/ayzarra.p12", "ayzarra".toCharArray()));
 //	    Container container = Container.open("util/faulty/bdoc21-bad-nonce-content.bdoc");
 	    container.save("/tmp/signed.bdoc");
@@ -6048,5 +6081,5 @@
 		Security.addProvider(new BouncyCastleProvider());
 		
-		Configuration configuration = new Configuration(Configuration.Mode.PROD);
+		Configuration configuration = new Configuration(Configuration.Mode.TEST);
 		
 		configuration.loadConfiguration(DIGIDOC4J_CONFIGURATION);
