Class: SOAP::RPC::SOAPMethodResponse

Inherits:
SOAPMethod show all
Defined in:
lib/soap/rpc/element.rb

Constant Summary

Constants inherited from SOAPMethod

SOAP::RPC::SOAPMethod::IN, SOAP::RPC::SOAPMethod::INOUT, SOAP::RPC::SOAPMethod::OUT, SOAP::RPC::SOAPMethod::RETVAL

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, SOAP::RPCRouter, SOAP::RPCServerException, SOAP::RPCUtils, SOAPNamespaceTag, SOAPProxy, TypeMap, VERSION, ValueArray, ValueArrayName, XSDNamespaceTag, XSINamespaceTag

Instance Attribute Summary

Attributes inherited from SOAPMethod

#inparam, #outparam, #param_def, #retval_class_name, #retval_name

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 inherited from SOAPMethod

create_doc_param_def, create_rpc_param_def, derive_rpc_param_def, #get_paramtypes, #have_outparam?, #input_params, #output_params, param_count, #set_outparam, #set_param

Methods inherited from SOAPStruct

#[], #[]=, #add, decode, #key?, #members, #replace, #to_obj, #to_s

Methods included from Enumerable

#inject

Methods included from SOAPType

#inspect, #rootnode

Methods inherited from XSD::NSDBase

inherited, #init, types

Constructor Details

#initialize(qname, param_def = nil) ⇒ SOAPMethodResponse

Returns a new instance of SOAPMethodResponse.



282
283
284
285
# File 'lib/soap/rpc/element.rb', line 282

def initialize(qname, param_def = nil)
  super(qname, param_def)
  @retval = nil
end

Instance Method Details

#eachObject



294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/soap/rpc/element.rb', line 294

def each
  if @retval_name and !@retval.is_a?(SOAPVoid)
    yield(@retval_name, @retval)
  end

  output_params.each do |name|
    unless @outparam[name]
      raise ParameterError.new("parameter: #{name} was not given")
    end
    yield(name, @outparam[name])
  end
end

#retval=(retval) ⇒ Object



287
288
289
290
291
292
# File 'lib/soap/rpc/element.rb', line 287

def retval=(retval)
  @retval = retval
  @retval.elename = @retval.elename.dup_name(@retval_name || 'return')
  retval.parent = self
  retval
end