Class SOAP::SOAPEnvelope
In: lib/soap/element.rb
Parent: XSD::NSDBase

Methods

body=   encode   header=   new   to_ary  

Included Modules

SOAPEnvelopeElement SOAPCompoundtype

Attributes

body  [R] 
external_content  [R] 
header  [R] 

Public Class methods

[Source]

     # File lib/soap/element.rb, line 219
219:   def initialize(header = nil, body = nil)
220:     super()
221:     @type = nil
222:     @elename = EleEnvelopeName
223:     @encodingstyle = nil
224:     @header = header
225:     @body = body
226:     @external_content = {}
227:     header.parent = self if header
228:     body.parent = self if body
229:   end

Public Instance methods

[Source]

     # File lib/soap/element.rb, line 236
236:   def body=(body)
237:     body.parent = self
238:     @body = body
239:   end

[Source]

     # File lib/soap/element.rb, line 241
241:   def encode(generator, ns, attrs = {})
242:     SOAPGenerator.assign_ns(attrs, ns, elename.namespace, SOAPNamespaceTag)
243:     name = ns.name(@elename)
244:     generator.encode_tag(name, attrs)
245: 
246:     yield(@header) if @header and @header.length > 0
247:     yield(@body)
248: 
249:     generator.encode_tag_end(name, true)
250:   end

[Source]

     # File lib/soap/element.rb, line 231
231:   def header=(header)
232:     header.parent = self
233:     @header = header
234:   end

[Source]

     # File lib/soap/element.rb, line 252
252:   def to_ary
253:     [header, body]
254:   end

[Validate]