TRESTClient throws EBindingScopeFactoryError


I have created new console application of C++ Builder Type. My requirement is to achieve REST API Request from DLL without any UI. With some research I found TREST library. But it requires VCL library. So I Just added new VCL form in Project it will ask you to enable VCL framework in project if not added Although I have not used this form anywhere in project as I need to implement Web Service Call without UI.
Now in here is my code,



int _tmain(int argc, _TCHAR* argv[])

System::UnicodeString inputXMLStringUnicode = "";
System::UnicodeString ABaseApiURL = ""; 
System::UnicodeString consumerKeyUnicode = ""; System::
UnicodeString consumerSecretUnicode = ""; 
System::UnicodeString signingClass = ""; 

TOAuth1Authenticator *Auth1Authenticator2 = new TOAuth1Authenticator(NULL); 
Auth1Authenticator2->ConsumerKey = consumerKeyUnicode; 
Auth1Authenticator2->ConsumerSecret = consumerSecretUnicode; 
Auth1Authenticator2->SigningClassName = signingClass; 

TRESTClient *RESTClient2 = new TRESTClient(ABaseApiURL); 
TRESTRequest *RESTRequest2 = new TRESTRequest(RESTClient2); 
TRESTResponse *RESTResponse2 = new TRESTResponse(NULL); 
RESTRequest2->Client = RESTClient2; 
RESTRequest2->Response = RESTResponse2; 
RESTRequest2->Method = rmPOST; 
RESTRequest2->AddBody(inputXMLStringUnicode, ctAPPLICATION_XML); 

AnsiString ansiConverted = RESTResponse2->Content; 
string response = ansiConverted.c_str(); 

return 0; 



When we run this app, It will make successful web service call. But after all code execution completes, after return statement, it throws below exception,

Project Project1.exe raised exception class EBindingScopeFactoryError with message 'Scope class TBindSourceAdapterCustomScope not registered'.

Responses (0)
  • There are no replies here yet.
Your Reply

Please login to post a reply