Class: SOAP::RPC::SOAPMethodRequest

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, AttrHref, AttrHrefName, AttrId, AttrIdName, AttrMustUnderstand, AttrMustUnderstandName, AttrOffset, AttrOffsetName, AttrPosition, AttrPositionName, AttrRoot, AttrRootName, Base64Literal, EleBody, EleBodyName, EleEnvelope, EleEnvelopeName, EleFault, EleFaultActor, EleFaultActorName, EleFaultCode, EleFaultCodeName, EleFaultDetail, EleFaultDetailName, EleFaultName, EleFaultString, EleFaultStringName, EleHeader, EleHeaderName, EncodingNamespace, EnvelopeNamespace, LiteralNamespace, MediaType, NextActor, PropertyName, SOAPNamespaceTag, SOAPProxy, TypeMap, ValueArray, ValueArrayName, Version, XSDNamespaceTag, XSINamespaceTag

Instance Attribute Summary collapse

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, #force_typed, #id, #parent, #position, #precedents, #root

Attributes inherited from XSD::NSDBase

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SOAPMethod

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

Methods inherited from SOAPStruct

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

Methods included from SOAPType

#inspect, #rootnode

Methods inherited from XSD::NSDBase

inherited, #init, types

Constructor Details

#initialize(qname, param_def = nil, soapaction = nil) ⇒ SOAPMethodRequest


293
294
295
296
# File 'lib/soap/rpc/element.rb', line 293

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

Instance Attribute Details

#soapactionObject

Returns the value of attribute soapaction


275
276
277
# File 'lib/soap/rpc/element.rb', line 275

def soapaction
  @soapaction
end

Class Method Details

.create_request(qname, *params) ⇒ Object


277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/soap/rpc/element.rb', line 277

def SOAPMethodRequest.create_request(qname, *params)
  param_def = []
  param_value = []
  i = 0
  params.each do |param|
    param_name = "p#{i}"
    i += 1
    param_def << [IN, param_name, nil]
    param_value << [param_name, param]
  end
  param_def << [RETVAL, 'return', nil]
  o = new(qname, param_def)
  o.set_param(param_value)
  o
end

Instance Method Details

#create_method_response(response_name = nil) ⇒ Object


313
314
315
316
317
# File 'lib/soap/rpc/element.rb', line 313

def create_method_response(response_name = nil)
  response_name ||=
    XSD::QName.new(@elename.namespace, @elename.name + 'Response')
  SOAPMethodResponse.new(response_name, @param_def)
end

#dupObject


307
308
309
310
311
# File 'lib/soap/rpc/element.rb', line 307

def dup
  req = self.class.new(@elename.dup, @param_def, @soapaction)
  req.encodingstyle = @encodingstyle
  req
end

#eachObject


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

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