Class: WsdlMapper::Runtime::Operation Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdl_mapper/runtime/operation.rb

Overview

This class is abstract.

noinspection RubyUnusedLocalVariable

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api, service, port) ⇒ Operation

Returns a new instance of Operation.



14
15
16
17
18
19
20
21
22
23
# File 'lib/wsdl_mapper/runtime/operation.rb', line 14

def initialize(api, service, port)
  @api = api
  @service = service
  @port = port
  @soap_action = nil
  @name = nil
  @operation_name = nil
  @requires = []
  @loaded = false
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/wsdl_mapper/runtime/operation.rb', line 9

def name
  @name
end

#operation_nameObject (readonly)

Returns the value of attribute operation_name.



9
10
11
# File 'lib/wsdl_mapper/runtime/operation.rb', line 9

def operation_name
  @operation_name
end

Instance Method Details

#input_d10rWsdlMapper::Runtime::InputD10r

This method is abstract.

Returns The deserializer for this operations input message.

Returns:

  • (WsdlMapper::Runtime::InputD10r)

    The deserializer for this operations input message



69
70
71
# File 'lib/wsdl_mapper/runtime/operation.rb', line 69

def input_d10r
  load_requires
end

#input_s8rWsdlMapper::Runtime::InputS8r

This method is abstract.

Returns The serializer for this operations input message.

Returns:



57
58
59
# File 'lib/wsdl_mapper/runtime/operation.rb', line 57

def input_s8r
  load_requires
end

#load_requiresObject

Dynamically loads the required classes (API types and serializers)



80
81
82
83
84
85
86
87
# File 'lib/wsdl_mapper/runtime/operation.rb', line 80

def load_requires
  return if @loaded

  @requires.each do |req|
    require req
  end
  @loaded = true
end

#new_envelope(header, body) ⇒ WsdlMapper::SvcDesc::Envelope



44
45
46
# File 'lib/wsdl_mapper/runtime/operation.rb', line 44

def new_envelope(header, body)
  WsdlMapper::SvcDesc::Envelope.new(header: header, body: body)
end

#new_input(header: {}, body: {}) ⇒ Object

This method is abstract.

Parameters:

  • header (Hash<Symbol, Object>) (defaults to: {})

    Keyword arguments for the corresponding input message header

  • body (Hash<Symbol, Object>) (defaults to: {})

    Keyword arguments for the corresponding input message body



28
29
30
31
# File 'lib/wsdl_mapper/runtime/operation.rb', line 28

def new_input(header: {}, body: {})
  load_requires
  nil
end

#new_message(header, body) ⇒ WsdlMapper::Runtime::Message



51
52
53
# File 'lib/wsdl_mapper/runtime/operation.rb', line 51

def new_message(header, body)
  Message.new(@port._soap_address, @soap_action, new_envelope(header, body))
end

#new_output(header: {}, body: {}) ⇒ Object

This method is abstract.

Parameters:

  • header (Hash<Symbol, Object>) (defaults to: {})

    Keyword arguments for the corresponding output message header

  • body (Hash<Symbol, Object>) (defaults to: {})

    Keyword arguments for the corresponding output message body



36
37
38
39
# File 'lib/wsdl_mapper/runtime/operation.rb', line 36

def new_output(header: {}, body: {})
  load_requires
  nil
end

#output_d10rWsdlMapper::Runtime::OutputD10r

This method is abstract.

Returns The deserializer for this operations output message.

Returns:

  • (WsdlMapper::Runtime::OutputD10r)

    The deserializer for this operations output message



75
76
77
# File 'lib/wsdl_mapper/runtime/operation.rb', line 75

def output_d10r
  load_requires
end

#output_s8rWsdlMapper::Runtime::OutputS8r

This method is abstract.

Returns The serializer for this operations output message.

Returns:



63
64
65
# File 'lib/wsdl_mapper/runtime/operation.rb', line 63

def output_s8r
  load_requires
end