function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
trick1trick1 

Rest Api

Hi Friends,

 

I have a question if somebody has written rest based services in .net and I want to consume in my salesforce org.Do I need WSDl file or in rest api concept of wsdl files does not exists?.

 

Can somebody please help?

 

Thanks,

Trick

 

Henry AkpalaHenry Akpala

You don't need to consume a wsdl to if it is rest.  You just need to add the url to the service in "Yourname, Setup, Security Control, Remote Site Settings"  then you can make http request to the service from within salesforce.  Below is a sample http request...

Http http = new Http();

 HttpRequest req = new HttpRequest();

req.setTimeout(120000); // timeout in milliseconds

 req.setEndpoint(SERVICE URL);

 req.setMethod('GET');

 HttpResponse res;

 res = http.send(req);

 

 

Regards

-H