anchor.diff:  
   %% @doc Call specified function with arguments and environment.
   %%
  -%% @spec call(atom(), atom(), [xmerlrpc_xml:proc_arg()], list()) ->
  +%% @spec step_call_function(atom(), atom(), [xmerlrpc_xml:proc_arg()],
  +%%                          list()) ->
   %%     {ok, xmerlrpc_xml:proc_arg()}
   %%   | {exception, Exception :: iolist()}
   
  -call(Module, Function, Args, Environment) ->
  +step_call_function(Module, Function, Args, Environment) ->
     % {ok,_} | {error,_} are for case when error is signaled by returned value
     % _ | erlang:error() are for case when error is signaled by dying
     try Module:Function(Args, Environment) of
  
positive.code: %% @doc Encode error returned by called function.
  %%   Function finished with an error.
  %%
  %% @spec encode_exception(iolist()) ->
  %%   http_response()
  
  encode_exception(Exception) ->
    {ok, Body} = xmerlrpc_xml:exception(1, Exception, []),
    http_success(Body).
  
  %% @doc Find and call an appropriate function from dispatch table.
  %%
  %%   `{error,_}' is operational error. `{exception,_}' is an error reported by
  %%   the called function.
  %%
  %% @spec dispatch(xmerlrpc_xml:proc_name(), [xmerlrpc_xml:proc_arg()],
  %%                [{Key :: atom(), Value :: term()}],
  %%                [{binary(), proc_spec()}]) ->
  %%     {ok, xmerlrpc_xml:xmlrpc_result()}
  %%   | {exception, Exception :: iolist()}
  %%   | {error, Reason}
  
  dispatch(ProcName, ProcArgs, Environment, DispatchTable) ->
    case proplists:lookup(ProcName, DispatchTable) of
      {ProcName, {Module, Function}} ->
        call(Module, Function, ProcArgs, Environment);
      none ->
        error_logger:error_report(xmerlrpc, [{step, dispatch}, {error, unknown_procedure}]),
        % unknown procedure is an exception, not a transport error
  
negative.code:       http_error(bad_request, "No content type")
    end;
  
  step_validate_request(Method, _ReqHeaders, _ReqBody,
                        _Environment, _DispatchTable) ->
    error_logger:error_report(xmerlrpc, [{step, validate_request}, {error, invalid_method}, {method, Method}]),
    http_error(bad_method, ["Invalid method: ", Method]).
  
  %% @doc Parse XML-RPC request.
  %%   Function parses request body as XML and extracts procedure name and
  %%   arguments.
  %%
  %% @spec step_parse_xmlrpc_request(string(), list(), term()) ->
  %%   http_response()
  
  step_parse_xmlrpc_request(ReqBody, Environment, DispatchTable) ->
    case xmerlrpc_xml:parse_request(ReqBody, []) of
      {ok, request, {ProcName, ProcArgs}} ->
        step_execute_request(ProcName, ProcArgs, Environment, DispatchTable);
      {error, Reason} ->
        error_logger:error_report(xmerlrpc, [{step, parse_xmlrpc_request}, {error, Reason}]),
        http_error(bad_request, "Invalid XML-RPC request")
  