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

How to call a third party application by using web services

Hi There,


    I dont have much idea about Web Services and so Need some examples for web services so that I can understand How we can make a request to a third party applications and get a response from it........ Help


1) write webservice such as: 


global class getAccountupdate2 {
WebService static Account getaccountByname() {
//Business Logic



2) call this webservice to third party application such as ASP.NET  through Add web reference and write a connection string for that..



Ashish Agrawal




          Get the third party wesservice WSDL and end point URL

          Go to Administrationsetup -> Security COntrols -> Remote site settings and create entry for the end point url

          Go to App Setup -> Develop -> Apex classes click "Generate from WSDL" button upload the wsdl file and generate classes

          Understand the classes linke what jeader you need to set and other parameters and then call methods from a webservice class.




i want to practice this callout to the thirdparty wsdl. Can you give me a free and safe thirdparty wsdl to call that  i can practice on? thanks


   Thanks for your reply 

As I'm very new to this concept.......Can you provide this with an example so that I can understand much more better




   There are two approached if you just want to access a webservice available in net all you do is refer below link with code sample :


   If it is complex and yu want to build classes for your webservice then you go with the approach I have specified below.

           HttpReponse and HttpRequest are two key classes in salesforce for webservice calling.



Pls let me know which wsdl file we r going to upload after clicking on Generate from Wsdl. Where this file exit r if we need generate that file, hw.. ?


Pls answer for this, it'll be  more helpfull for me.




             I don't have much idea about this.According to my knowledge I'm giving this basic steps


To upload a wsdl file u have to navigate to


Setup---Develop---Api---Generate Apex WSDL(I mean which ever WSDL u want u can generate it) and then save the file as a XML Format......Upload this file