Class: SOAP::SOAPEnvelope

Inherits:
XSD::NSDBase show all
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, Charset, EleBody, EleBodyName, EleEnvelope, EleEnvelopeName, EleFault, EleFaultActor, EleFaultActorName, EleFaultCode, EleFaultCodeName, EleFaultDetail, EleFaultDetailName, EleFaultName, EleFaultString, EleFaultStringName, EleHeader, EleHeaderName, EncodingNamespace, EnvelopeNamespace, LiteralNamespace, MediaType, NextActor, PropertyName, RPCRouter, RPCServerException, RPCUtils, SOAPGenerator, SOAPProxy, TypeMap, VERSION, ValueArray, ValueArrayName

Instance Attribute Summary collapse

Attributes included from SOAPCompoundtype

#qualified

Attributes included from SOAPType

#definedtype, #elename, #encodingstyle, #extraattr, #id, #parent, #position, #precedents, #root

Attributes inherited from XSD::NSDBase

#type

Instance Method Summary collapse

Methods included from SOAPType

#inspect, #rootnode

Methods inherited from XSD::NSDBase

inherited, #init, types

Constructor Details

#initialize(header = nil, body = nil) ⇒ SOAPEnvelope

Returns a new instance of SOAPEnvelope.



240
241
242
243
244
245
246
247
248
249
250
# File 'lib/soap/element.rb', line 240

def initialize(header = nil, body = nil)
  super()
  @type = nil
  @elename = EleEnvelopeName
  @encodingstyle = nil
  @header = header
  @body = body
  @external_content = {}
  header.parent = self if header
  body.parent = self if body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



237
238
239
# File 'lib/soap/element.rb', line 237

def body
  @body
end

#external_contentObject (readonly)

Returns the value of attribute external_content.



238
239
240
# File 'lib/soap/element.rb', line 238

def external_content
  @external_content
end

#headerObject

Returns the value of attribute header.



236
237
238
# File 'lib/soap/element.rb', line 236

def header
  @header
end

Instance Method Details

#encode(generator, ns, attrs = {}) {|@header| ... } ⇒ Object

Yields:



262
263
264
265
266
267
268
269
# File 'lib/soap/element.rb', line 262

def encode(generator, ns, attrs = {})
  Generator.assign_ns(attrs, ns, elename.namespace)
  name = ns.name(@elename)
  generator.encode_tag(name, attrs)
  yield(@header) if @header and @header.encode?
  yield(@body)
  generator.encode_tag_end(name, true)
end

#to_aryObject



271
272
273
# File 'lib/soap/element.rb', line 271

def to_ary
  [header, body]
end