Class: SOAP::SOAPHeaderItem
- Inherits:
-
XSD::NSDBase
- Object
- XSD::NSDBase
- SOAP::SOAPHeaderItem
- Includes:
- SOAPCompoundtype, SOAPEnvelopeElement
- Defined in:
- lib/soap/element.rb
Constant Summary
Constants included from SOAP
AttrActor, AttrActorName, AttrArrayType, AttrArrayTypeName, AttrEncodingStyle, AttrEncodingStyleName, AttrHref, AttrHrefName, AttrId, AttrIdName, AttrMustUnderstand, AttrMustUnderstandName, AttrOffset, AttrOffsetName, AttrPosition, AttrPositionName, AttrRoot, AttrRootName, Base64Literal, EleBody, EleBodyName, EleEnvelope, EleEnvelopeName, EleFault, EleFaultActor, EleFaultActorName, EleFaultCode, EleFaultCodeName, EleFaultDetail, EleFaultDetailName, EleFaultName, EleFaultString, EleFaultStringName, EleHeader, EleHeaderName, EncodingNamespace, EnvelopeNamespace, LiteralNamespace, MediaType, NextActor, PropertyName, SOAPNamespaceTag, SOAPProxy, TypeMap, ValueArray, ValueArrayName, Version, XSDNamespaceTag, XSINamespaceTag
Instance Attribute Summary collapse
-
#actor ⇒ Object
Returns the value of attribute actor.
-
#element ⇒ Object
Returns the value of attribute element.
-
#encodingstyle ⇒ Object
Returns the value of attribute encodingstyle.
-
#mustunderstand ⇒ Object
Returns the value of attribute mustunderstand.
Attributes included from SOAPCompoundtype
Attributes included from SOAPType
#definedtype, #elename, #extraattr, #force_typed, #id, #parent, #position, #precedents, #root
Attributes inherited from XSD::NSDBase
Instance Method Summary collapse
- #encode(generator, ns, attrs = {}) {|@element| ... } ⇒ Object
-
#initialize(element, mustunderstand = true, encodingstyle = nil, actor = nil) ⇒ SOAPHeaderItem
constructor
A new instance of SOAPHeaderItem.
Methods included from SOAPType
Methods inherited from XSD::NSDBase
Constructor Details
#initialize(element, mustunderstand = true, encodingstyle = nil, actor = nil) ⇒ SOAPHeaderItem
Returns a new instance of SOAPHeaderItem.
158 159 160 161 162 163 164 165 166 167 |
# File 'lib/soap/element.rb', line 158 def initialize(element, mustunderstand = true, encodingstyle = nil, actor = nil) super() @type = nil @element = element @mustunderstand = mustunderstand @encodingstyle = encodingstyle @actor = actor element.parent = self if element element.qualified = true end |
Instance Attribute Details
#actor ⇒ Object
Returns the value of attribute actor.
156 157 158 |
# File 'lib/soap/element.rb', line 156 def actor @actor end |
#element ⇒ Object
Returns the value of attribute element.
153 154 155 |
# File 'lib/soap/element.rb', line 153 def element @element end |
#encodingstyle ⇒ Object
Returns the value of attribute encodingstyle.
155 156 157 |
# File 'lib/soap/element.rb', line 155 def encodingstyle @encodingstyle end |
#mustunderstand ⇒ Object
Returns the value of attribute mustunderstand.
154 155 156 |
# File 'lib/soap/element.rb', line 154 def mustunderstand @mustunderstand end |
Instance Method Details
#encode(generator, ns, attrs = {}) {|@element| ... } ⇒ Object
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/soap/element.rb', line 169 def encode(generator, ns, attrs = {}) attrs.each do |key, value| @element.extraattr[key] = value end # to remove mustUnderstand attribute, set it to nil unless @mustunderstand.nil? @element.extraattr[AttrMustUnderstandName] = (@mustunderstand ? '1' : '0') end if @encodingstyle @element.extraattr[AttrEncodingStyleName] = @encodingstyle end unless @element.encodingstyle @element.encodingstyle = @encodingstyle end if @actor @element.extraattr[AttrActorName] = @actor end yield(@element) end |