Flowdock
method

perform_invocation

Importance_0
v1.2.6 - Show latest stable - 0 notes - Class: ActionWebService::Client::XmlRpc
perform_invocation(method_name, args) protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionwebservice/lib/action_web_service/client/xmlrpc_client.rb, line 38
        def perform_invocation(method_name, args)
          method = @api.api_methods[method_name.to_sym]
          if method.expects && method.expects.length != args.length
            raise(ArgumentError, "#{method.public_name}: wrong number of arguments (#{args.length} for #{method.expects.length})")
          end
          args = method.cast_expects(args.dup) rescue args
          if method.expects
            method.expects.each_with_index{ |type, i| args[i] = @protocol.value_to_xmlrpc_wire_format(args[i], type) }
          end
          ok, return_value = @client.call2(public_name(method_name), *args)
          return (method.cast_returns(return_value.dup) rescue return_value) if ok
          raise(ClientError, "#{return_value.faultCode}: #{return_value.faultString}")
        end
Register or log in to add new notes.