| Class | WSDL::OperationBinding |
| In: |
lib/wsdl/operationBinding.rb
|
| Parent: | Info |
| fault | [R] | |
| input | [R] | |
| name | [R] | |
| output | [R] | |
| soapoperation | [R] |
# File lib/wsdl/operationBinding.rb, line 22
22: def initialize
23: super
24: @name = nil
25: @input = nil
26: @output = nil
27: @fault = []
28: @soapoperation = nil
29: end
# File lib/wsdl/operationBinding.rb, line 39
39: def find_operation
40: porttype.operations[@name] or raise RuntimeError.new("#{@name} not found")
41: end
# File lib/wsdl/operationBinding.rb, line 97
97: def parse_attr(attr, value)
98: case attr
99: when NameAttrName
100: @name = XSD::QName.new(targetnamespace, value.source)
101: else
102: nil
103: end
104: end
# File lib/wsdl/operationBinding.rb, line 71
71: def parse_element(element)
72: case element
73: when InputName
74: o = Param.new
75: @input = o
76: o
77: when OutputName
78: o = Param.new
79: @output = o
80: o
81: when FaultName
82: o = Param.new
83: @fault << o
84: o
85: when SOAPOperationName
86: o = WSDL::SOAP::Operation.new
87: @soapoperation = o
88: o
89: when DocumentationName
90: o = Documentation.new
91: o
92: else
93: nil
94: end
95: end
# File lib/wsdl/operationBinding.rb, line 35
35: def porttype
36: root.porttype(parent.type)
37: end
# File lib/wsdl/operationBinding.rb, line 63
63: def soapaction
64: if @soapoperation
65: @soapoperation.soapaction
66: else
67: nil
68: end
69: end
# File lib/wsdl/operationBinding.rb, line 43
43: def soapoperation_name
44: if @soapoperation
45: @soapoperation.input_info.op_name
46: else
47: find_operation.name
48: end
49: end
# File lib/wsdl/operationBinding.rb, line 51
51: def soapoperation_style
52: style = nil
53: if @soapoperation
54: style = @soapoperation.operation_style
55: elsif parent.soapbinding
56: style = parent.soapbinding.style
57: else
58: raise TypeError.new("operation style definition not found")
59: end
60: style || :document
61: end