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
manjirimanjiri 

How to export web services

I have written some webservice.

e.g following webservice.

global class createWebservice
{
// Pass in the endpoint to be used using the string url
WebService static String getContent()
{
// my code
}
}

How can I use this webservice from external application. I mean how I can call this webservice from external application?

Thanks
RickyGRickyG
Click on the WSDL link for the class, and then consume this in your external application.
manjirimanjiri
Thanks Ricky for the reply. I will try out it.
manjirimanjiri
Hi,


I got this link after clicking on Generate WSD button.

https://na3.salesforce.com/services/wsdl/class/createWebservice

createWebservice is my apex class name. in above example, if I want to call getContent method how can I call that from my external application client?

thanks
SuperfellSuperfell
You import the WSDL into your external app, and use the generated stub to call it. Just like you would with the regular enterprise/partner API. (If you've never looked at the regular API, then i suggest you start there, all the development steps apply to an apex web service as well)
manjirimanjiri
Thanks Simon
symantecAPsymantecAP

Hi Manjiri 

 

When you call your webservice from external App then would that App need SFDC credentials.

 

Thanks