Class: WSDL::Binding

Inherits:
Info show all
Defined in:
lib/action_web_service/wsdl/binding.rb

Instance Attribute Summary collapse

Attributes inherited from Info

#id, #parent, #root

Instance Method Summary collapse

Methods inherited from Info

#inspect, #parse_epilogue

Constructor Details

#initializeBinding

Returns a new instance of Binding.



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

def initialize
  super
  @name = nil
  @type = nil
  @operations = XSD::NamedElements.new
  @soapbinding = nil
end

Instance Attribute Details

#nameObject (readonly)

required



17
18
19
# File 'lib/action_web_service/wsdl/binding.rb', line 17

def name
  @name
end

#operationsObject (readonly)

Returns the value of attribute operations.



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

def operations
  @operations
end

#soapbindingObject (readonly)

Returns the value of attribute soapbinding.



20
21
22
# File 'lib/action_web_service/wsdl/binding.rb', line 20

def soapbinding
  @soapbinding
end

#typeObject (readonly)

required



18
19
20
# File 'lib/action_web_service/wsdl/binding.rb', line 18

def type
  @type
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object



52
53
54
55
56
57
58
59
60
61
# File 'lib/action_web_service/wsdl/binding.rb', line 52

def parse_attr(attr, value)
  case attr
  when NameAttrName
    @name = XSD::QName.new(targetnamespace, value.source)
  when TypeAttrName
    @type = value
  else
    nil
  end
end

#parse_element(element) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/action_web_service/wsdl/binding.rb', line 34

def parse_element(element)
  case element
  when OperationName
    o = OperationBinding.new
    @operations << o
    o
  when SOAPBindingName
    o = WSDL::SOAP::Binding.new
    @soapbinding = o
    o
  when DocumentationName
    o = Documentation.new
    o
  else
    nil
  end
end

#targetnamespaceObject



30
31
32
# File 'lib/action_web_service/wsdl/binding.rb', line 30

def targetnamespace
  parent.targetnamespace
end