+ Start a Discussion

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?





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);


 HttpResponse res;

 res = http.send(req);