Class: WSDL::Param
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
required.
-
#name ⇒ Object
readonly
optional but required for fault.
-
#soapbody ⇒ Object
readonly
Returns the value of attribute soapbody.
-
#soapfault ⇒ Object
readonly
Returns the value of attribute soapfault.
-
#soapheader ⇒ Object
readonly
Returns the value of attribute soapheader.
Attributes inherited from Info
Instance Method Summary collapse
- #find_message ⇒ Object
-
#initialize ⇒ Param
constructor
A new instance of Param.
- #parse_attr(attr, value) ⇒ Object
- #parse_element(element) ⇒ Object
- #soapbody_encodingstyle ⇒ Object
- #soapbody_use ⇒ Object
- #targetnamespace ⇒ Object
Methods inherited from Info
Constructor Details
#initialize ⇒ Param
Returns a new instance of Param.
22 23 24 25 26 27 28 29 |
# File 'lib/wsdl/param.rb', line 22 def initialize super @message = nil @name = nil @soapbody = nil @soapheader = [] @soapfault = nil end |
Instance Attribute Details
#name ⇒ Object (readonly)
optional but required for fault.
17 18 19 |
# File 'lib/wsdl/param.rb', line 17 def name @name end |
#soapbody ⇒ Object (readonly)
Returns the value of attribute soapbody.
18 19 20 |
# File 'lib/wsdl/param.rb', line 18 def soapbody @soapbody end |
#soapfault ⇒ Object (readonly)
Returns the value of attribute soapfault.
20 21 22 |
# File 'lib/wsdl/param.rb', line 20 def soapfault @soapfault end |
#soapheader ⇒ Object (readonly)
Returns the value of attribute soapheader.
19 20 21 |
# File 'lib/wsdl/param.rb', line 19 def soapheader @soapheader end |
Instance Method Details
#find_message ⇒ Object
35 36 37 |
# File 'lib/wsdl/param.rb', line 35 def root.(@message) or raise RuntimeError.new("#{@message} not found") end |
#parse_attr(attr, value) ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/wsdl/param.rb', line 77 def parse_attr(attr, value) case attr when MessageAttrName if value.namespace.nil? value = XSD::QName.new(targetnamespace, value.source) end @message = value when NameAttrName @name = XSD::QName.new(targetnamespace, value.source) else nil end end |
#parse_element(element) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/wsdl/param.rb', line 55 def parse_element(element) case element when SOAPBodyName o = WSDL::SOAP::Body.new @soapbody = o o when SOAPHeaderName o = WSDL::SOAP::Header.new @soapheader << o o when SOAPFaultName o = WSDL::SOAP::Fault.new @soapfault = o o when DocumentationName o = Documentation.new o else nil end end |
#soapbody_encodingstyle ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/wsdl/param.rb', line 47 def soapbody_encodingstyle if @soapbody @soapbody.encodingstyle else nil end end |
#soapbody_use ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/wsdl/param.rb', line 39 def soapbody_use if @soapbody @soapbody.use || :literal else nil end end |
#targetnamespace ⇒ Object
31 32 33 |
# File 'lib/wsdl/param.rb', line 31 def targetnamespace parent.targetnamespace end |