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, 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 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.



227
228
229
230
231
232
233
234
235
236
237
# File 'lib/soap/element.rb', line 227

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.



224
225
226
# File 'lib/soap/element.rb', line 224

def body
  @body
end

#external_contentObject (readonly)

Returns the value of attribute external_content.



225
226
227
# File 'lib/soap/element.rb', line 225

def external_content
  @external_content
end

#headerObject

Returns the value of attribute header.



223
224
225
# File 'lib/soap/element.rb', line 223

def header
  @header
end

Instance Method Details

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

Yields:



249
250
251
252
253
254
255
256
257
258
# File 'lib/soap/element.rb', line 249

def encode(generator, ns, attrs = {})
  SOAPGenerator.assign_ns(attrs, ns, elename.namespace, SOAPNamespaceTag)
  name = ns.name(@elename)
  generator.encode_tag(name, attrs)

  yield(@header) if @header and @header.length > 0
  yield(@body)

  generator.encode_tag_end(name, true)
end

#to_aryObject



260
261
262
# File 'lib/soap/element.rb', line 260

def to_ary
  [header, body]
end