anchor.diff:      ok.
   code_change(_OldVsn, St, _Extra) ->
       {ok, St}.
  -
  -
  -
  -
  -%% Invoked by schedule_rpc.
  -%% A message originated from a locally connected service
  -%% has timed out
  -handle_local_timeout(CompSpec, Service, TransID) ->
  -    rvi_common:notification(service_edge, ?SERVER, handle_local_timeout, 
  -			    [ { service, Service}, 
  -			      { transaction_id, TransID} ], 
  -			    CompSpec).
  -
  -%%
  -%% Handle a message, delivered from a remote node through protocol, that is
  -%% to be forwarded to a locally connected service.
  -%%
  -handle_remote_message(CompSpec, ServiceName, Timeout, NetworkAddress,
  -		      Parameters, Signature, Certificate) ->
  -    rvi_common:notification(service_edge, ?SERVER, handle_remote_message,
  -			    [ { service, ServiceName }, 
  -			      { timeout, Timeout }, 
  -			      { network_address, NetworkAddress },
  -			      { parameters, Parameters },
  -			      { signature, Signature }, 
  -			      { certificate, Certificate } ],
  -			    CompSpec).
  -
   
   
   
  
positive.code:     %% the messaage to its locally connected service_name service.
      %%
      [ok, Certificate, Signature ] = 
  	authorize_rpc:authorize_local_message(St#st.cs, ServiceName),
      
      
      %%
      %% Check if this is a local service by trying to resolve its service name. 
      %% If successful, just forward it to its service_name.
      %% 
      case ets:lookup(?SERVICE_TABLE, ServiceName)  of
  	[ #service_entry { url = URL } ]  -> %% ServiceName is local. Forward message
  	    ?debug("service_edge_rpc:local_msg(): Service is local. Forwarding."),
  	    Res = forward_message_to_local_service(URL, 
  						   ServiceName, 
  						   Parameters,
  						   St#st.cs),
  	    { reply, Res , St};
  
  	_ -> %% ServiceName is remote
  	    %% Ask Schedule the request to resolve the network address
  	    ?debug("service_edge_rpc:local_msg(): Service is remote. Scheduling."),
  	    [ _, TID ] = schedule_rpc:schedule_message(St#st.cs, 
  						       ServiceName, 
  						       Timeout, 
  						       Parameters,
  						       Certificate,
  
negative.code: %% JSON-RPC entry point
  %% Called by local exo http server
  handle_notification("handle_local_timeout", Args) ->
      {ok, SvcName} = rvi_common:get_json_element(["service"], Args),
      {ok, TransactionID} = rvi_common:get_json_element(["transaction_id"], Args),
      gen_server:cast(?SERVER, { rvi, handle_local_timeout, 
  			       [ SvcName, TransactionID]}),
  
      ok;
  
  