Class: WSDL::OperationBinding
- Inherits:
-
Info
show all
- Defined in:
- lib/wsdl/operationBinding.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
Returns a new instance of OperationBinding.
22
23
24
25
26
27
28
29
|
# File 'lib/wsdl/operationBinding.rb', line 22
def initialize
super
@name = nil
@input = nil
@output = nil
@fault = []
@soapoperation = nil
end
|
Instance Attribute Details
Returns the value of attribute fault.
19
20
21
|
# File 'lib/wsdl/operationBinding.rb', line 19
def fault
@fault
end
|
Returns the value of attribute input.
17
18
19
|
# File 'lib/wsdl/operationBinding.rb', line 17
def input
@input
end
|
16
17
18
|
# File 'lib/wsdl/operationBinding.rb', line 16
def name
@name
end
|
Returns the value of attribute output.
18
19
20
|
# File 'lib/wsdl/operationBinding.rb', line 18
def output
@output
end
|
#soapoperation ⇒ Object
Returns the value of attribute soapoperation.
20
21
22
|
# File 'lib/wsdl/operationBinding.rb', line 20
def soapoperation
@soapoperation
end
|
Instance Method Details
#find_operation ⇒ Object
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/wsdl/operationBinding.rb', line 39
def find_operation
porttype.operations.each do |op|
next if op.name != @name
next if op.input and @input and op.input.name and @input.name and
op.input.name != @input.name
next if op.output and @output and op.output.name and @output.name and
op.output.name != @output.name
return op
end
raise RuntimeError.new("#{@name} not found")
end
|
#parse_attr(attr, value) ⇒ Object
113
114
115
116
117
118
119
120
|
# File 'lib/wsdl/operationBinding.rb', line 113
def parse_attr(attr, value)
case attr
when NameAttrName
@name = value.source
else
nil
end
end
|
#parse_element(element) ⇒ Object
35
36
37
|
# File 'lib/wsdl/operationBinding.rb', line 35
def porttype
root.porttype(parent.type)
end
|
#soapaction ⇒ Object
79
80
81
82
83
84
85
|
# File 'lib/wsdl/operationBinding.rb', line 79
def soapaction
if @soapoperation
@soapoperation.soapaction
else
nil
end
end
|
#soapbody_use_input ⇒ Object
71
72
73
|
# File 'lib/wsdl/operationBinding.rb', line 71
def soapbody_use_input
soapbody_use(@input)
end
|
#soapbody_use_output ⇒ Object
75
76
77
|
# File 'lib/wsdl/operationBinding.rb', line 75
def soapbody_use_output
soapbody_use(@output)
end
|
#soapoperation_name ⇒ Object
51
52
53
54
55
56
57
|
# File 'lib/wsdl/operationBinding.rb', line 51
def soapoperation_name
op_name = find_operation.operationname
if @input and @input.soapbody and @input.soapbody.namespace
op_name = XSD::QName.new(@input.soapbody.namespace, op_name.name)
end
op_name
end
|
#soapoperation_style ⇒ Object
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/wsdl/operationBinding.rb', line 59
def soapoperation_style
style = nil
if @soapoperation
style = @soapoperation.operation_style
elsif parent.soapbinding
style = parent.soapbinding.style
else
raise TypeError.new("operation style definition not found")
end
style || :document
end
|
#targetnamespace ⇒ Object
31
32
33
|
# File 'lib/wsdl/operationBinding.rb', line 31
def targetnamespace
parent.targetnamespace
end
|