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.
26 27 28 29 30 31 32 33 34 |
# File 'lib/wsdl/soap/header.rb', line 26 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.
23 24 25 |
# File 'lib/wsdl/soap/header.rb', line 23 def encodingstyle @encodingstyle end |
#headerfault ⇒ Object (readonly)
Returns the value of attribute headerfault.
18 19 20 |
# File 'lib/wsdl/soap/header.rb', line 18 def headerfault @headerfault end |
#message ⇒ Object (readonly)
required
20 21 22 |
# File 'lib/wsdl/soap/header.rb', line 20 def @message end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
24 25 26 |
# File 'lib/wsdl/soap/header.rb', line 24 def namespace @namespace end |
#part ⇒ Object (readonly)
required
21 22 23 |
# File 'lib/wsdl/soap/header.rb', line 21 def part @part end |
#use ⇒ Object (readonly)
required
22 23 24 |
# File 'lib/wsdl/soap/header.rb', line 22 def use @use end |
Instance Method Details
#find_message ⇒ Object
40 41 42 |
# File 'lib/wsdl/soap/header.rb', line 40 def root.(@message) or raise RuntimeError.new("#{@message} not found") end |
#find_part ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/wsdl/soap/header.rb', line 44 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
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/wsdl/soap/header.rb', line 64 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
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/wsdl/soap/header.rb', line 53 def parse_element(element) case element when HeaderFaultName o = WSDL::SOAP::HeaderFault.new @headerfault = o o else nil end end |
#targetnamespace ⇒ Object
36 37 38 |
# File 'lib/wsdl/soap/header.rb', line 36 def targetnamespace parent.targetnamespace end |