code: def validate_args(action_name, args)
        in_params = @registry.get_method_signature(action_name)[:input]
        # TODO: compare number of parameters.
        args_hash = in_params.each_with_index.inject({}) do
            |result, (in_param, index)|
          result.merge({in_param[:name] => deep_copy(args[index])})
        end
        validate_arguments(args_hash, in_params)
        return args_hash
      end
docs: Instance initializer.
  
   Args:
    - registry: a registry that defines service
  
   Validates input parameters to:
   - add parameter names;
   - resolve xsi:type where required;
   - convert some native types to XML.