lib/avatax_taxservice.rb
####################################################################################################
# ping - Verifies connectivity to the web service and returns version information about the service.
####################################################################################################

Verifies connectivity to the web service and returns version information about the service.
Verifies connectivity to the web service and returns version information about the service .
def ping(message = nil)
    @service = 'Ping'
    @message = message == nil ? "?" : message
      @soap = @template_ping.result(binding)
      if @debug
        @log.puts "#{Time.now}: SOAP request created:"
        @log.puts @soap
      end
      begin
        if @debug
          @log.puts "#{Time.now}: Calling #{@service} Service"
          time = Benchmark.measure do
            @response = @client.call(:ping, xml: @soap).to_hash
          end
          @log.puts "Response times for Ping:"
          @log.puts @responsetime_hdr
          @log.puts time
        else
          @response = @client.call(:ping, xml: @soap).to_hash
        end
      @response = messages_to_array(@response[:ping_response][:ping_result])
      return @response
      rescue Savon::Error => error
        abend(error)
      end
    end
def ping ( message = nil ) @service = 'Ping' @message = message == nil ? "?" : message @soap = @template_ping . result ( binding ) if @debug @log . puts "#{Time.now}: SOAP request created:" @log . puts @soap end begin if @debug @log . puts "#{Time.now}: Calling #{@service} Service" time = Benchmark . measure do @response = @client . call ( :ping , xml : @soap ) . to_hash end @log . puts "Response times for Ping:" @log . puts @responsetime_hdr @log . puts time else @response = @client . call ( :ping , xml : @soap ) . to_hash end @response = messages_to_array ( @response [ :ping_response ] [ :ping_result ] ) return @response rescue Savon :: Error => error abend ( error ) end end
ping - Verifies connectivity to the web service and returns version information about the service.
ping - Verifies connectivity to the web service and returns version information about the service .
#Read in the SOAP template
 # Subsitute real vales for template place holders
 # Make the call to the Avalara service
 # Call using debug
 # Use Ruby built in Benchmark function to record response times
 # Call Ping Service
 # Call Ping Service
 #Strip off outer layer of the hash - not needed
 #Capture unexpected errors

message
<not_specific>