class Sekken::WSDL::Binding
Attributes
name[R]
port_type[R]
style[R]
transport[R]
Public Class Methods
new(binding_node)
click to toggle source
# 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
Public Instance Methods
fetch_port_type(documents)
click to toggle source
# 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
operations()
click to toggle source
# File lib/sekken/wsdl/binding.rb, line 29 def operations @operations ||= operations! end
Private Instance Methods
find_soap_node()
click to toggle source
# File lib/sekken/wsdl/binding.rb, line 50 def find_soap_node @binding_node.element_children.find { |node| namespace = node.namespace.href soap_1_1 = namespace == Sekken::NS_SOAP_1_1 soap_1_2 = namespace == Sekken::NS_SOAP_1_2 binding = node.name == 'binding' (soap_1_1 || soap_1_2) && binding } end
operations!()
click to toggle source
# File lib/sekken/wsdl/binding.rb, line 35 def operations! operations = {} @binding_node.element_children.each do |operation_node| next unless operation_node.name == 'operation' operation_name = operation_node['name'] operation = BindingOperation.new(operation_node, :style => @style) operations[operation_name] = operation end operations end