Changeset 556

Show
Ignore:
Timestamp:
03/24/07 14:50:12 (2 years ago)
Author:
sacha
Message:

removed puts statement. changed them to logger statements if applicable

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/hefeweizen_library_business_logic.rb

    r553 r556  
    191191            @logger.debug "#{me}: Outgoing ebXML message must get encrypted." if @debug 
    192192            if !command.nil? then 
    193               puts command 
     193              @logger.debug command if @debug 
    194194              return true, command 
    195195            else 
     
    602602              @logger.debug "#{me}: Outgoing ebXML message must get encrypted." if @debug 
    603603              if !command.nil? then 
    604                 puts command 
     604                @logger.debug command if @debug 
    605605                return command, expectation 
    606606              else 
     
    20132013        if true then 
    20142014           
    2015           puts command = "hefeweizen_sign_ebXML_signal_message \"#{file_path}\" \"#{hash['private_key_file']}\" \"#{hash['password_file']}\" \"#{hash['certificate_file']}\" \"#{temp_file_path}\"" 
    2016            
     2015          command = "hefeweizen_sign_ebXML_signal_message \"#{file_path}\" \"#{hash['private_key_file']}\" \"#{hash['password_file']}\" \"#{hash['certificate_file']}\" \"#{temp_file_path}\"" 
     2016           
     2017          @logger.debug "#{me}: #{command}" if @debug 
     2018 
    20172019          # blocking call 
    20182020          system command 
     
    24302432            # TODO check encryption algorithm 
    24312433            @logger.debug "#{me}: ebXML Message must be decrypted." if @debug 
    2432             require 'pp' 
    2433             pp info_structure 
    24342434            reference = info_structure['info']['doc-exchange-receiver-digital-envelope-certificate-id'] 
    24352435            hash, error_message = @b2b_system.get_certficates_path_for_reference reference 
     
    24762476               
    24772477              command = "#{HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash}" 
    2478               puts new_command = "echo \"#{command}\" > #{@config['PIPE_TO_ANIA']}" 
     2478              new_command = "echo \"#{command}\" > #{@config['PIPE_TO_ANIA']}" 
    24792479 
    24802480              system new_command 
     
    24902490                  exit = true 
    24912491                rescue EOFError => error 
    2492                   puts "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
    2493                   puts "CORE ERROR: #{error.to_s}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
    2494                   puts "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
     2492                  @logger.error "ERROR reading from pipe '#{my_pipe}': #{error.to_s}', '#{error.inspect}', '#{error.backtrace}'" 
    24952493                  sleep (0.1) 
    24962494                end 
  • trunk/src/hefeweizen_library_directive.rb

    r553 r556  
    273273        @config = config 
    274274        @logger = @config['LOGGER'] 
     275        @debug = @info = @warn = @error = nil 
    275276        case @config['LOG_LEVEL_SCREEN'] 
    276277        when 'debug' then 
  • trunk/src/hefeweizen_library_ebMS_message2.rb

    r553 r556  
    11981198              # ebXML messages do not yet have the HTTP header information. 
    11991199              if line =~ /--HefeWeizenBoundary/  then 
    1200                 puts "alternative found" 
    12011200                is_multipart = true 
    12021201                boundary = '--HefeWeizenBoundary' 
  • trunk/src/taskers/hefeweizen_tasker_application_decrypt_ebXML_message.rb

    r517 r556  
    55# Copyright (c) 2007 HavanaWave AG (http://www.HavanaWave.com) 
    66# 
    7 # $Id:
     7# $Id
    88# 
    99# WARNING: This program as such is intended to be used by professional 
     
    225225          # xmlsec1 decrypt --privkey-pem coronation_encryption_cert/Coronation_encryption_private_key.pem --output debian-logo-2.png out2.xml 
    226226          command = "xmlsec1 decrypt --privkey-pem #{@private_key_file_path} --output #{output_file_path} #{content_file_path}" 
    227           puts command 
     227          # puts command 
    228228          system command 
    229229          if $? == 0 then 
     
    268268 
    269269      def get_content_hash_of_ebXML_message 
    270         return HefeWeizen::HefeWeizenLibrary::EBMessage2.get_raw_payloads_array(File.expand_path @ebXML_message_file_path
     270        return (HefeWeizen::HefeWeizenLibrary::EBMessage2.get_raw_payloads_array(File.expand_path(@ebXML_message_file_path))
    271271      end 
    272272    end # class 
  • trunk/src/taskers/hefeweizen_tasker_application_encrypt_ebXML_message.rb

    r515 r556  
    240240          output_file_path = "#{@config['TEMP_FILE_DIR']}/encrypted_output_#{id}.xml" 
    241241          command = "xmlsec1 encrypt --binary-data #{content_file_path} --session-key des-192 --pubkey-cert-pem #{@certificate} --output #{output_file_path} #{template_filename}" 
    242           puts command 
    243242          system command 
    244243          if $? == 0 then 
     
    283282 
    284283      def get_content_hash_of_ebXML_message 
    285         return HefeWeizen::HefeWeizenLibrary::EBMessage2.get_raw_payloads_array(File.expand_path @ebXML_message_file_path
     284        return (HefeWeizen::HefeWeizenLibrary::EBMessage2.get_raw_payloads_array(File.expand_path(@ebXML_message_file_path))
    286285      end 
    287286    end # class