In Files

  • soap/rpc/element.rb
  • soap/rpc/proxy.rb
  • soap/rpc/router.rb

Class/Module Index [+]

Quicksearch

SOAP::RPC::SOAPMethod

Constants

IN
INOUT
OUT
RETVAL

Attributes

inparam[R]
outparam[R]
param_def[R]
retval_class_name[R]
retval_name[R]

Public Class Methods

create_doc_param_def(req_qnames, res_qnames) click to toggle source
 
               # File soap/rpc/element.rb, line 162
def SOAPMethod.create_doc_param_def(req_qnames, res_qnames)
  req_qnames = [req_qnames] if req_qnames.is_a?(XSD::QName)
  res_qnames = [res_qnames] if res_qnames.is_a?(XSD::QName)
  param_def = []
  req_qnames.each do |qname|
    param_def << [IN, qname.name, [nil, qname.namespace, qname.name]]
  end
  res_qnames.each do |qname|
    param_def << [OUT, qname.name, [nil, qname.namespace, qname.name]]
  end
  param_def
end
            
create_rpc_param_def(param_names) click to toggle source
 
               # File soap/rpc/element.rb, line 153
def SOAPMethod.create_rpc_param_def(param_names)
  param_def = []
  param_names.each do |param_name|
    param_def.push([IN, param_name, nil])
  end
  param_def.push([RETVAL, 'return', nil])
  param_def
end
            
derive_rpc_param_def(obj, name, *param) click to toggle source
 
               # File soap/rpc/element.rb, line 140
def SOAPMethod.derive_rpc_param_def(obj, name, *param)
  if param.size == 1 and param[0].is_a?(Array)
    return param[0]
  end
  if param.empty?
    method = obj.method(name)
    param_names = (1..method.arity.abs).collect { |i| "p#{i}" }
  else
    param_names = param
  end
  create_rpc_param_def(param_names)
end
            
new(qname, param_def = nil) click to toggle source
 
               # File soap/rpc/element.rb, line 83
def initialize(qname, param_def = nil)
  super(nil)
  @elename = qname
  @encodingstyle = nil

  @param_def = param_def

  @signature = []
  @inparam_names = []
  @inoutparam_names = []
  @outparam_names = []

  @inparam = {}
  @outparam = {}
  @retval_name = nil
  @retval_class_name = nil

  init_param(@param_def) if @param_def
end
            
param_count(param_def, *type) click to toggle source
 
               # File soap/rpc/element.rb, line 130
def SOAPMethod.param_count(param_def, *type)
  count = 0
  param_def.each do |io_type, name, param_type|
    if type.include?(io_type)
      count += 1
    end
  end
  count
end
            

Public Instance Methods

have_outparam?() click to toggle source
 
               # File soap/rpc/element.rb, line 103
def have_outparam?
  @outparam_names.size > 0
end
            
input_params() click to toggle source
 
               # File soap/rpc/element.rb, line 107
def input_params
  collect_params(IN, INOUT)
end
            
output_params() click to toggle source
 
               # File soap/rpc/element.rb, line 111
def output_params
  collect_params(OUT, INOUT)
end
            
set_outparam(params) click to toggle source
 
               # File soap/rpc/element.rb, line 123
def set_outparam(params)
  params.each do |param, data|
    @outparam[param] = data
    data.elename.name = param
  end
end
            
set_param(params) click to toggle source
 
               # File soap/rpc/element.rb, line 115
def set_param(params)
  params.each do |param, data|
    @inparam[param] = data
    data.elename.name = param
    data.parent = self
  end
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus