Class: EgonGate::Kobra::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/egon_gate/kobra/request.rb

Instance Method Summary collapse

Instance Method Details

#clientObject



8
9
10
11
# File 'lib/egon_gate/kobra/request.rb', line 8

def client
  @client ||= Savon.client(wsdl: 'https://serviszr01.servis.justice.cz/GateService/GateService.svc?wsdl', convert_request_keys_to: :camelcase,
    ssl_verify_mode: :none, log: true, pretty_print_xml: true)
end

#send_message(egsb_message) ⇒ Object



13
14
15
16
17
# File 'lib/egon_gate/kobra/request.rb', line 13

def send_message(egsb_message)
  message = Message.new(egsb_message)
  res = client.call(:get_data, message: { 'inputXml' => message.to_s }, attributes: {'xmlns' => 'http://tempuri.org/'})
  EgonGate::Kobra::Response.new(res)
end