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
ashish jadhav 9ashish jadhav 9 

How to write web services using SOAP or REST?

I'm new to integration part, can some please tell me how can I write web serivces or can provide me any small snippet to understand. Which method is easy to use and mostly used in industry practice? What should be my approach during integration if I choose SOAP or REST API?
Best Answer chosen by ashish jadhav 9
Amit Chaudhary 8Amit Chaudhary 8
Day by day i am become a fan of TraillHead. Now learning in salesforce to much easy as compare to our time. The Salesforce Trailhead now offers a fun way to learn everything related to Salesforce Integration

Apex Integration Services
https://developer.salesforce.com/trailhead/module/apex_integration_services?utm_campaign=trailhead&utm_source=sfdc&utm_medium=chatter-success


Apex Integration Overview
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_callouts
This module will Describe the differences between web service and HTTP callouts and Authorize an external site with remote site settings


Apex REST Callouts
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_rest_callouts
This module will  describe about Perform a callout to receive data from an external service and Test callouts by using mock callouts 

Apex SOAP Callouts
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_soap_callouts
This module will describe you about Generate Apex classes using WSDL2Apex and  Perform a callout to send data to an external service using SOAP with Test callouts by using mock callouts


Apex Web Services
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_webservices
This module will Describe the two types of Apex web services and provide a high-level overview of these services. Create an Apex REST class that contains methods for each HTTP method and Invoke a custom Apex REST method with an endpoint

Please check below post as well
1) http://amitsalesforce.blogspot.in/2016/06/insert-update-delete-record-by-rest-api.html
2) http://amitsalesforce.blogspot.in/2016/06/rest-explorer-using-workbench-execute.html
3) http://amitsalesforce.blogspot.in/2016/04/rest-api-in-salesforce-execute-rest-api.html

NOTE:- To many example are there in above link

Please let us know if this will help you
 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Day by day i am become a fan of TraillHead. Now learning in salesforce to much easy as compare to our time. The Salesforce Trailhead now offers a fun way to learn everything related to Salesforce Integration

Apex Integration Services
https://developer.salesforce.com/trailhead/module/apex_integration_services?utm_campaign=trailhead&utm_source=sfdc&utm_medium=chatter-success


Apex Integration Overview
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_callouts
This module will Describe the differences between web service and HTTP callouts and Authorize an external site with remote site settings


Apex REST Callouts
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_rest_callouts
This module will  describe about Perform a callout to receive data from an external service and Test callouts by using mock callouts 

Apex SOAP Callouts
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_soap_callouts
This module will describe you about Generate Apex classes using WSDL2Apex and  Perform a callout to send data to an external service using SOAP with Test callouts by using mock callouts


Apex Web Services
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_webservices
This module will Describe the two types of Apex web services and provide a high-level overview of these services. Create an Apex REST class that contains methods for each HTTP method and Invoke a custom Apex REST method with an endpoint

Please check below post as well
1) http://amitsalesforce.blogspot.in/2016/06/insert-update-delete-record-by-rest-api.html
2) http://amitsalesforce.blogspot.in/2016/06/rest-explorer-using-workbench-execute.html
3) http://amitsalesforce.blogspot.in/2016/04/rest-api-in-salesforce-execute-rest-api.html

NOTE:- To many example are there in above link

Please let us know if this will help you
 
This was selected as the best answer
ashish jadhav 9ashish jadhav 9
Thanks for your help Amit.