Path to Code
Begin Your Salesforce Coding Adventure
Episode 9
Building SOAP Integrations in Salesforce
• Enterprise Solutions Architect
• Global Community Speaker
Jigar Shah
@jigarshah189
Agenda
• Need for Integration
• What is SOAP?
• Consuming External SOAP Services in Salesforce
• Performing SOAP Callouts in Salesforce
• Testing SOAP Callouts
• Choosing the right weapon SOAP Vs REST
• Q&A
Some Housekeeping Rules…
• Mute your mic
• Keep adding questions in Zoom Q&A Window
• No questions are silly!
• Questions will be answered in the last 15 mins of this session
Need for Integration
 Legacy migrations
 Eradicate data silos
 Unified view of fragmented
data
 Data consistency
Understanding SOAP Basics
Service
Consumer
Service
Provider
HTTP
• Simple Object Access
Protocol
• XML-based message
exchange
• WSDL (Web Service
Discovery Language)
1. Envelope
2. Header
3. Body
4. Fault
Consuming External SOAP Services
• WSDL2Apex Utility
• Generates Apex
code from WSDL
WSDL
Native Apex Class
WSDL2Apex
Utility
Demo 1
Generate Apex Classes from WSDL using WSDL2Apex
Performing SOAP Callouts
Demo 2
Performing SOAP Callouts
Testing SOAP Callouts
• Callouts are not
permitted in Test classes
• WebServiceMock
Interface
• Emulate service calls
Demo 3
Writing Test Classes for SOAP Callouts
Choosing SOAP vs REST
Considerations SOAP REST
Protocol Simple Object Access Protocol Representational State Transfer
Type WSDL based Url based
Data Exchange Format XML JSON
Maintainability High Maintenance Low Maintenance
Sample Use cases
• Exchanges where contract is well
defined
• Data heavy exchanges
• Public API Development
• Exchanges involving back & forth
communication
Resources
 Apex Developer Guide: SOAP Services
 Testing Webservice Callouts
 Open Source WSDL2Apex Generator
Trailhead Modules
Lightning Platform API Basics Apex Integration Services
Q & A
Thank You
Subscribe

Episode 9 - Building soap integrations in salesforce