创建TRESTClient时,未注册带该GUID接口的对应体,问题出在哪?
- 内容介绍
- 文章标签
- 相关推荐
本文共计225个文字,预计阅读时间需要1分钟。
我已经创建了用于我的类的REST客户端,但在运行时遇到了TRESTClient组件的问题。TFrwWebServiceREST=class(TInterfacedObject, IRESTWebServiceProxy)private FClientRest: TRESTClient;FRequestRest: TRESTRequest;FResponseRest: TRESTR;
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;
错误并不总是发生…该过程完美地运行,然后一段时间后,此错误开始发生.
First chance exception at $7656C54F. Exception class EIPAbstractError with message ‘No peer with the interface with guid {B8BD5BD8-C39D-4DF1-BB14-625FC86029DB} has been registered’.
创建RESTClient时会引发异常.它能是什么?
有必要将IPPeerClient包含在客户端代码中的“uses”子句中,并将IPPeerServer包含在服务器代码中的“uses”子句中,请参阅blogs.embarcadero.com/pawelglowacki/2013/01/10/39958
本文共计225个文字,预计阅读时间需要1分钟。
我已经创建了用于我的类的REST客户端,但在运行时遇到了TRESTClient组件的问题。TFrwWebServiceREST=class(TInterfacedObject, IRESTWebServiceProxy)private FClientRest: TRESTClient;FRequestRest: TRESTRequest;FResponseRest: TRESTR;
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;
错误并不总是发生…该过程完美地运行,然后一段时间后,此错误开始发生.
First chance exception at $7656C54F. Exception class EIPAbstractError with message ‘No peer with the interface with guid {B8BD5BD8-C39D-4DF1-BB14-625FC86029DB} has been registered’.
创建RESTClient时会引发异常.它能是什么?
有必要将IPPeerClient包含在客户端代码中的“uses”子句中,并将IPPeerServer包含在服务器代码中的“uses”子句中,请参阅blogs.embarcadero.com/pawelglowacki/2013/01/10/39958

