Class: SOAP::SOAPHeader
- Inherits:
-
SOAPStruct
- Object
- XSD::NSDBase
- SOAPStruct
- SOAP::SOAPHeader
- Includes:
- SOAPEnvelopeElement
- Defined in:
- lib/soap/element.rb
Constant Summary
Constants included from SOAP
AttrActor, AttrActorName, AttrArrayType, AttrArrayTypeName, AttrEncodingStyle, AttrEncodingStyleName, AttrMustUnderstand, AttrMustUnderstandName, AttrOffset, AttrOffsetName, AttrPosition, AttrPositionName, AttrRoot, AttrRootName, Base64Literal, Charset, EleBody, EleBodyName, EleEnvelope, EleEnvelopeName, EleFault, EleFaultActor, EleFaultActorName, EleFaultCode, EleFaultCodeName, EleFaultDetail, EleFaultDetailName, EleFaultName, EleFaultString, EleFaultStringName, EleHeader, EleHeaderName, EncodingNamespace, EnvelopeNamespace, LiteralNamespace, MediaType, NS, NextActor, PropertyName, RPCRouter, RPCServerException, RPCUtils, SOAPNamespaceTag, SOAPProxy, TypeMap, VERSION, ValueArray, ValueArrayName, XSDNamespaceTag, XSINamespaceTag
Instance Attribute Summary
Attributes included from SOAPCompoundtype
Attributes included from SOAPType
#definedtype, #elename, #encodingstyle, #extraattr, #id, #parent, #position, #precedents, #root
Attributes inherited from XSD::NSDBase
Instance Method Summary collapse
- #add(name, value) ⇒ Object
- #encode(generator, ns, attrs = {}) ⇒ Object
-
#initialize ⇒ SOAPHeader
constructor
A new instance of SOAPHeader.
- #length ⇒ Object (also: #size)
Methods inherited from SOAPStruct
#[], #[]=, decode, #each, #key?, #members, #replace, #to_obj, #to_s
Methods included from Enumerable
Methods included from SOAPType
Methods inherited from XSD::NSDBase
Constructor Details
#initialize ⇒ SOAPHeader
Returns a new instance of SOAPHeader.
189 190 191 192 193 |
# File 'lib/soap/element.rb', line 189 def initialize super(nil) @elename = EleHeaderName @encodingstyle = nil end |
Instance Method Details
#add(name, value) ⇒ Object
204 205 206 207 208 209 210 |
# File 'lib/soap/element.rb', line 204 def add(name, value) actor = value.extraattr[AttrActorName] mu = (value.extraattr[AttrMustUnderstandName] == '1') encstyle = value.extraattr[AttrEncodingStyleName] item = SOAPHeaderItem.new(value, mu, encstyle, actor) super(name, item) end |
#encode(generator, ns, attrs = {}) ⇒ Object
195 196 197 198 199 200 201 202 |
# File 'lib/soap/element.rb', line 195 def encode(generator, ns, attrs = {}) name = ns.name(@elename) generator.encode_tag(name, attrs) @data.each do |data| yield(data) end generator.encode_tag_end(name, true) end |
#length ⇒ Object Also known as: size
212 213 214 |
# File 'lib/soap/element.rb', line 212 def length @data.length end |