class WsdlMapper::Runtime::Operation

@abstract noinspection RubyUnusedLocalVariable

Attributes

name[R]
operation_name[R]

Public Class Methods

new(api, service, port) click to toggle source

@param [WsdlMapper::Runtime::Api] api @param [WsdlMapper::Runtime::Service] service @param [WsdlMapper::Runtime::Port] port

# 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

Public Instance Methods

input_d10r() click to toggle source

@abstract @return [WsdlMapper::Runtime::InputD10r] The deserializer for this operations input message

# File lib/wsdl_mapper/runtime/operation.rb, line 69
def input_d10r
  load_requires
end
input_s8r() click to toggle source

@abstract @return [WsdlMapper::Runtime::InputS8r] The serializer for this operations input message

# File lib/wsdl_mapper/runtime/operation.rb, line 57
def input_s8r
  load_requires
end
load_requires() click to toggle source

Dynamically loads the required classes (API types and serializers)

# 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) click to toggle source

@return [WsdlMapper::SvcDesc::Envelope] @param [WsdlMapper::Runtime::Header] header @param [WsdlMapper::Runtime::Body] body

# 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: {}) click to toggle source

@abstract @param [Hash<Symbol, Object>] header Keyword arguments for the corresponding input message header @param [Hash<Symbol, Object>] body Keyword arguments for the corresponding input message body

# File lib/wsdl_mapper/runtime/operation.rb, line 28
def new_input(header: {}, body: {})
  load_requires
  nil
end
new_message(header, body) click to toggle source

@param [WsdlMapper::Runtime::Header] header @param [WsdlMapper::Runtime::Body] body @return [WsdlMapper::Runtime::Message]

# 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: {}) click to toggle source

@abstract @param [Hash<Symbol, Object>] header Keyword arguments for the corresponding output message header @param [Hash<Symbol, Object>] body Keyword arguments for the corresponding output message body

# File lib/wsdl_mapper/runtime/operation.rb, line 36
def new_output(header: {}, body: {})
  load_requires
  nil
end
output_d10r() click to toggle source

@abstract @return [WsdlMapper::Runtime::OutputD10r] The deserializer for this operations output message

# File lib/wsdl_mapper/runtime/operation.rb, line 75
def output_d10r
  load_requires
end
output_s8r() click to toggle source

@abstract @return [WsdlMapper::Runtime::OutputS8r] The serializer for this operations output message

# File lib/wsdl_mapper/runtime/operation.rb, line 63
def output_s8r
  load_requires
end