Class: Sekken::WSDL::Binding

Inherits:
Object
  • Object
show all
Defined in:
lib/sekken/wsdl/binding.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(binding_node) ⇒ Binding

Returns a new instance of Binding.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/sekken/wsdl/binding.rb', line 7

def initialize(binding_node)
  @binding_node = binding_node

  @name = binding_node['name']
  @port_type = binding_node['type']

  if soap_node = find_soap_node
    @style = soap_node['style'] || 'document'
    @transport = soap_node['transport']
  end
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



19
20
21
# File 'lib/sekken/wsdl/binding.rb', line 19

def name
  @name
end

#port_typeObject (readonly)

Returns the value of attribute port_type.



19
20
21
# File 'lib/sekken/wsdl/binding.rb', line 19

def port_type
  @port_type
end

#styleObject (readonly)

Returns the value of attribute style.



19
20
21
# File 'lib/sekken/wsdl/binding.rb', line 19

def style
  @style
end

#transportObject (readonly)

Returns the value of attribute transport.



19
20
21
# File 'lib/sekken/wsdl/binding.rb', line 19

def transport
  @transport
end

Instance Method Details

#fetch_port_type(documents) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/sekken/wsdl/binding.rb', line 21

def fetch_port_type(documents)
  port_type_local = @port_type.split(':').last

  documents.port_types.fetch(port_type_local) {
    raise "Unable to find portType #{port_type_local.inspect} for binding #{@name.inspect}"
  }
end

#operationsObject



29
30
31
# File 'lib/sekken/wsdl/binding.rb', line 29

def operations
  @operations ||= operations!
end