An error occurred while creating TRESTCLIENT: “None registers the peer of the interface with GUID [{}]

I have created my class to use REST. I have a problem with the TRESTClient component at runtime.

 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;

The error does not always happen… the process works perfectly, and then after a while, this error starts to happen.

First chance exception at $7656C54F. Exception class EIPAbstract Error with message ‘No peer with the interface with guid {B8BD5BD8-C39D-4DF1-BB14-625FC86029DB} has been registered’.

An exception will be thrown when creating a RESTClient. What can it be?

It is necessary to include IPPeerClient in the “uses” clause in the client code, and add IPPeerServer is included in the “uses” clause in the server code, please refer to
http://blogs.embarcadero.com/pawelglowacki/2013/01/10/39958

I I have created my class to use REST. I have a problem with the TRESTClient component at runtime.

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;

Errors don’t always happen… the process works perfectly, and then after a while, this error starts to happen.

< p>

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’.

p>

An exception is thrown when creating a RESTClient. What can it be?

It is necessary to include IPPeerClient in the “uses” clause in the client code and IPPeerServer in the “uses” clause in the server code Please refer to
http://blogs.embarcadero.com/pawelglowacki/2013/01/10/39958

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3178 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.