Class | SOAP::RPC::SOAPMethod
In: | soap/rpc/element.rb
Parent: | SOAPStruct

### Methods

create_doc_param_def create_rpc_param_def derive_rpc_param_def have_outparam? input_params new output_params param_count set_outparam set_param

### Constants

RETVAL | = | 'retval'
IN | = | 'in'
OUT | = | 'out'
INOUT | = | 'inout'

### 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)

[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)

[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)

[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)

[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)

[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?()

[Source]

    # File soap/rpc/element.rb, line 103
      def have_outparam?
        @outparam_names.size > 0
      end

input_params()

[Source]

    # File soap/rpc/element.rb, line 107
      def input_params
        collect_params(IN, INOUT)
      end

output_params()

[Source]

    # File soap/rpc/element.rb, line 111
      def output_params
        collect_params(OUT, INOUT)
      end

set_outparam(params)

[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)

[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

[Validate]