SOAP::SOAPHeaderItem (Class)

In: soap/element.rb
Parent: XSD::NSDBase

Methods

encode   new  

Attributes

content  [RW] 
encodingstyle  [RW] 
mustunderstand  [RW] 

Included Modules

SOAPEnvelopeElement SOAPCompoundtype

Public Class methods

[Source]

# File soap/element.rb, line 145
  def initialize(content, mustunderstand = true, encodingstyle = nil)
    super(nil)
    @content = content
    @mustunderstand = mustunderstand
    @encodingstyle = encodingstyle || LiteralNamespace
  end

Public Instance methods

[Source]

# File soap/element.rb, line 152
  def encode(generator, ns, attrs = {})
    attrs.each do |key, value|
      @content.attr[key] = value
    end
    @content.attr[ns.name(EnvelopeNamespace, AttrMustUnderstand)] =
      (@mustunderstand ? '1' : '0')
    if @encodingstyle
      @content.attr[ns.name(EnvelopeNamespace, AttrEncodingStyle)] =
        @encodingstyle
    end
    @content.encodingstyle = @encodingstyle if !@content.encodingstyle
    yield(@content, true)
  end

[Validate]