Пример #1
0
        public string Send()
        {
            string pathJavaExe        = ConfigurationManager.AppSettings[Constants.PATH_JAVA_EXE];
            string commandExecuteJava = ConfigurationManager.AppSettings[Constants.COMMAND_EXECUTE_JAVA_SEND];
            string workingDirectory   = ConfigurationManager.AppSettings[Constants.WORKING_DIRECTORY];
            int    timeOut            = int.Parse(ConfigurationManager.AppSettings[Constants.TIMEOUT]);

            int exitCode = ExecProcess.ExecuteProcess(pathJavaExe,
                                                      commandExecuteJava + GetParameters(),
                                                      workingDirectory,
                                                      timeOut,
                                                      out response);

            return(response);
        }
Пример #2
0
        public static int signJAVA(string pathXML, string pathXMLSave, int typeDoc)
        {
            int exitCode = 0;

            if (documentNotSign(pathXML, typeDoc))
            {
                string response           = "";
                string pathJavaExe        = ConfigurationManager.AppSettings[Constants.PATH_JAVA_EXE];
                string commandExecuteJava = ConfigurationManager.AppSettings[Constants.COMMAND_EXECUTE_JAVA_SIGN];
                string workingDirectory   = ConfigurationManager.AppSettings[Constants.WORKING_DIRECTORY];
                int    timeOut            = int.Parse(ConfigurationManager.AppSettings[Constants.TIMEOUT]);

                exitCode = ExecProcess.ExecuteProcess(pathJavaExe,
                                                      commandExecuteJava + GetParameters(pathXML, pathXMLSave),
                                                      workingDirectory,
                                                      timeOut,
                                                      out response);
                return(exitCode);
            }
            return(exitCode);
        }