| Class | WSDL::PortType |
| In: |
lib/wsdl/portType.rb
|
| Parent: | Info |
| name | [R] | |
| operations | [R] |
# File lib/wsdl/portType.rb, line 24
24: def initialize
25: super
26: @name = nil
27: @operations = XSD::NamedElements.new
28: end
# File lib/wsdl/portType.rb, line 30
30: def find_binding
31: root.bindings.find { |item| item.type == @name } or
32: raise RuntimeError.new("#{@name} not found")
33: end
# File lib/wsdl/portType.rb, line 35
35: def locations
36: bind_name = find_binding.name
37: result = []
38: root.services.each do |service|
39: service.ports.each do |port|
40: if port.binding == bind_name
41: result << port.soap_address.location if port.soap_address
42: end
43: end
44: end
45: result
46: end
# File lib/wsdl/portType.rb, line 62
62: def parse_attr(attr, value)
63: case attr
64: when NameAttrName
65: @name = XSD::QName.new(targetnamespace, value.source)
66: else
67: nil
68: end
69: end
# File lib/wsdl/portType.rb, line 48
48: def parse_element(element)
49: case element
50: when OperationName
51: o = Operation.new
52: @operations << o
53: o
54: when DocumentationName
55: o = Documentation.new
56: o
57: else
58: nil
59: end
60: end