Class: WSDL::SOAP::Header
Instance Attribute Summary collapse
-
#encodingstyle ⇒ Object
readonly
Returns the value of attribute encodingstyle.
-
#headerfault ⇒ Object
readonly
Returns the value of attribute headerfault.
-
#message ⇒ Object
readonly
required.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#part ⇒ Object
readonly
required.
-
#use ⇒ Object
readonly
required.
Attributes inherited from Info
Instance Method Summary collapse
- #find_message ⇒ Object
- #find_part ⇒ Object
-
#initialize ⇒ Header
constructor
A new instance of Header.
- #parse_attr(attr, value) ⇒ Object
- #parse_element(element) ⇒ Object
- #targetnamespace ⇒ Object
Methods inherited from Info
Constructor Details
#initialize ⇒ Header
Returns a new instance of Header.
25 26 27 28 29 30 31 32 33 |
# File 'lib/wsdl/soap/header.rb', line 25 def initialize super @message = nil @part = nil @use = nil @encodingstyle = nil @namespace = nil @headerfault = nil end |
Instance Attribute Details
#encodingstyle ⇒ Object (readonly)
Returns the value of attribute encodingstyle
22 23 24 |
# File 'lib/wsdl/soap/header.rb', line 22 def encodingstyle @encodingstyle end |
#headerfault ⇒ Object (readonly)
Returns the value of attribute headerfault
17 18 19 |
# File 'lib/wsdl/soap/header.rb', line 17 def headerfault @headerfault end |
#message ⇒ Object (readonly)
required
19 20 21 |
# File 'lib/wsdl/soap/header.rb', line 19 def @message end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace
23 24 25 |
# File 'lib/wsdl/soap/header.rb', line 23 def namespace @namespace end |
#part ⇒ Object (readonly)
required
20 21 22 |
# File 'lib/wsdl/soap/header.rb', line 20 def part @part end |
#use ⇒ Object (readonly)
required
21 22 23 |
# File 'lib/wsdl/soap/header.rb', line 21 def use @use end |
Instance Method Details
#find_message ⇒ Object
39 40 41 |
# File 'lib/wsdl/soap/header.rb', line 39 def root.(@message) or raise RuntimeError.new("#{@message} not found") end |
#find_part ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/wsdl/soap/header.rb', line 43 def find_part .parts.each do |part| if part.name == @part return part end end raise RuntimeError.new("#{@part} not found") end |
#parse_attr(attr, value) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/wsdl/soap/header.rb', line 63 def parse_attr(attr, value) case attr when MessageAttrName if value.namespace.nil? value = XSD::QName.new(targetnamespace, value.source) end @message = value when PartAttrName @part = value.source when UseAttrName @use = value.source when EncodingStyleAttrName @encodingstyle = value.source when NamespaceAttrName @namespace = value.source else nil end end |
#parse_element(element) ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/wsdl/soap/header.rb', line 52 def parse_element(element) case element when HeaderFaultName o = WSDL::SOAP::HeaderFault.new @headerfault = o o else nil end end |
#targetnamespace ⇒ Object
35 36 37 |
# File 'lib/wsdl/soap/header.rb', line 35 def targetnamespace parent.targetnamespace end |