创建TRESTClient时出错:“0”;没有注册guid为[{}]的接口的对等方";

创建TRESTClient时出错:“0”;没有注册guid为[{}]的接口的对等方";,rest,delphi-xe7,Rest,Delphi Xe7,我创建了一个与REST一起工作的类。我在运行时遇到TRESTClient组件问题 TFrwWebServiceREST = class(TInterfacedObject, IRESTWebServiceProxy) private FClientRest: TRESTClient; FRequestRest: TRESTRequest; FResponseRest: TRESTResponse; public constructor Create (AUrl: string);

我创建了一个与REST一起工作的类。我在运行时遇到TRESTClient组件问题

TFrwWebServiceREST = class(TInterfacedObject, IRESTWebServiceProxy)
private
  FClientRest: TRESTClient;
  FRequestRest: TRESTRequest;
  FResponseRest: TRESTResponse;
public
  constructor Create (AUrl: string); virtual;
end;

...

constructor TFrwWebServiceREST.Create(AUrl: string);
begin
  FClientRest := TRESTClient.Create (AUrl); //the error occurs here
  FClientRest.AcceptEncoding := 'UTF-8';
  FResponseRest := TRESTResponse.Create (nil);
  FResponseRest.ContentEncoding := 'UTF-8';
  FRequestRest := TRESTRequest.Create (nil);
  FRequestRest.AcceptEncoding := 'UTF-8';
  FRequestRest.Response := FResponseRest;
  FRequestRest.Client := FClientRest;
end;
错误并不总是发生。。。这个过程工作得很好,过了一段时间,这个错误开始出现

首次机会例外价格为7656C54F美元。异常类EIPAbstractError显示消息“没有注册guid为{B8BD5BD8-C39D-4DF1-BB14-625FC86029DB}的接口的对等方”


创建RESTClient时引发异常。可能是什么?

必须在客户端代码中包含IPPeerClient到接口“uses”子句,并在服务器代码中包含IPPeerServer到接口“uses”子句,请参见

将IPPeerClient添加到界面使用和问题解决