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
neeedhelpneeedhelp 

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

adroitusadroitus

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..

 

Regards,

Ashish Agrawal

vriavmvriavm

Hi,

 

          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.

 

         

Teach_me_howTeach_me_how

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

neeedhelpneeedhelp

   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

vriavmvriavm

Hi,

 

   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 :

           http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_httpresponse.htm

   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.

 

SalesforceLearner.ax1433SalesforceLearner.ax1433

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.

 

Thanks,

neeedhelpneeedhelp

             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