Class: WsdlMapper::Runtime::Operation Abstract

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

Overview

This class is abstract.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Operation) initialize(api, service, port)

Returns a new instance of Operation



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

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

- (Object) name (readonly)

Returns the value of attribute name



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

def name
  @name
end

- (Object) operation_name (readonly)

Returns the value of attribute operation_name



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

def operation_name
  @operation_name
end

Instance Method Details

- (WsdlMapper::Runtime::InputD10r) input_d10r

This method is abstract.

Returns The deserializer for this operations input message

Returns:

  • (WsdlMapper::Runtime::InputD10r)

    The deserializer for this operations input message



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

def input_d10r
  load_requires
end

- (WsdlMapper::Runtime::InputS8r) input_s8r

This method is abstract.

Returns The serializer for this operations input message

Returns:



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

def input_s8r
  load_requires
end

- (Object) load_requires

Dynamically loads the required classes (API types and serializers)



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

def load_requires
  return if @loaded

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

- (WsdlMapper::SvcDesc::Envelope) new_envelope(header, body)



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

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

- (Object) new_input(header: {}, body: {})

This method is abstract.

Parameters:

  • header (Hash<Symbol, Object>)

    Keyword arguments for the corresponding input message header

  • body (Hash<Symbol, Object>)

    Keyword arguments for the corresponding input message body



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

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

- (WsdlMapper::Runtime::Message) new_message(header, body)



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

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

- (Object) new_output(header: {}, body: {})

This method is abstract.

Parameters:

  • header (Hash<Symbol, Object>)

    Keyword arguments for the corresponding output message header

  • body (Hash<Symbol, Object>)

    Keyword arguments for the corresponding output message body



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

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

- (WsdlMapper::Runtime::OutputD10r) output_d10r

This method is abstract.

Returns The deserializer for this operations output message

Returns:

  • (WsdlMapper::Runtime::OutputD10r)

    The deserializer for this operations output message



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

def output_d10r
  load_requires
end

- (WsdlMapper::Runtime::OutputS8r) output_s8r

This method is abstract.

Returns The serializer for this operations output message

Returns:



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

def output_s8r
  load_requires
end