SlideShare a Scribd company logo
Using the Tooling API to Generate 
Apex SOAP Web Service Clients 
Daniel Ballinger 
Senior Developer 
@FishOfPrey
Daniel Ballinger 
Senior Developer 
@FishOfPrey
Have you ever seen… 
Feature Limits 
Apex and 
Deployment 
No file chosen 
Choose File 
Error: Failed to parse wsdl: Unknown element: import 
No file chosen 
Choose File 
Error: Failed to parse wsdl: Found more than one wsdl:binding. WSDL with multiple binding not supported 
Apex Generation Failed 
Unsupported WSDL. Found more than one part for message XAVRequestMessage 
Apex Generation Failed 
Unsupported schema type: {http://www.w3.org/2001/XMLSchema}anyType 
Apex Generation Failed 
The total size of apex code in this application after removing comments exceeds the maximum character size of 
3000000 
Apex Generation Failed 
Class name 'toolingSoapSforceCom' already in use. Please delete this class or specify a new class name 
Supported WSDL Features 
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm#supported_wsdls_topic-title
In This Session 
•The FuseIT SFDC Explorer tool 
• Existing Salesforce WSDL functionality 
•Demo custom WSDL to Apex tooling 
•How it was made
The FuseIT SFDC Explorer Tool – FusesFriend 
• Features 
• Windows only for the full tool 
• Basic web version of WSDL tooling 
– Session management 
– Schema Explorer + Tooling API 
– SOQL queries 
– Running Test Cases 
– Debug Log Monitoring 
– Data Export Retrieval 
– Anonymous Apex 
– Code Coverage 
– WSDL import to Apex 
http://www.fuseit.com/explorer
Unsupported 
feature 
Existing WSDL2Apex Experience 
WSDL 
> 1 MB 
<xsd:import> 
<xsd:include> 
Existing Class 
Name 
Manually 
Edit WSDL 
Superfluous 
bindings 
Download 
single WSDL 
Generate 
from WSDL 
Upload 
single WSDL 
Namespaces 
to Classes 
Generate 
Apex Code 
Call 
Generated 
Code
Shaving the [WSDL] Yak 
“Yak shaving is what you are doing when you're doing 
some stupid, fiddly little task that bears no obvious 
relationship to what you're supposed to be working 
on, but yet a chain of twelve causal relations links 
what you're doing to the original meta-task.” 
Scott Hanselman 
Photo by Dennis Jarvis CC BY-SA 3.0
Demo 
SFDC Explorer Basic
The IT Crowd – Series 1 Episode 2: Fire!
Code Coverage Testing for Generated Code 
•Need to implement WebServiceMock Interface 
• Invoke each web service method 
•Handle Request and Response types 
•Supporting Types (Headers)
Demo 
SFDC Explorer Web Service Mock
The Metadata API – Handling larger WSDLs 
Class name 'Metadata' already in use. 
Please edit WSDL to remove repeated 
names 
• CustomObject et al. extend Metadata and 
need elements from it to work correctly. 
<xs:extension base="Metadata"> 
• 330 KB WSDL 
Apex Character Limit 
Metadata 
590,915 
Remaining 
• 590,915 characters / 6740 lines 
without comments 
• Approximately 20% of 3,000,000 
character Apex limit
Method filtering functionality 
•Reduces amount of generated code 
•Reduces testing requirements for dead code 
• Potentially skips unsupported features 
• Optionally remove supporting Apex classes
Demo 
SFDC Explorer Method filtering
How it works 
Deploy to 
Salesforce 
• Tooling API to 
deploy all 
associated Apex 
classes at once 
Transform 
to Apex 
• T4 (Text Template 
Transformation 
Toolkit)Templates to 
convert the object 
model into Apex 
Build Apex 
Model 
• C# Object Model of 
Apex Classes, 
Members and 
Methods 
Parse 
WSDL 
• Import all WSDL 
data and extract 
required elements
.NET Representation of Apex Class model 
ApexClass 
1 InnerApexClasses * Members * Methods 
ApexClassCollection ApexMember 
StringArrayApexMember 
ApexMethod 
ApexMethodParameter 
ApexMethodHttp 
ReturnType 
ReturnVoid ReturnPrimitive ReturnClassType 
Type Infos 
Inner Classes 
Namespace Collection 
Parameters 
* 
ReturnType 
1 
ApexClasses 
0..* 
Outer class for each Namespace 
Created for the Port/Service 
Each Request/Response
Tooling API deployment 
Existing ID 
• Create a MetadataContainer with a 
unique name 
• Create a collection of 
ApexClassMember referencing the 
MetadataContainerId 
• Create a ContainerAsyncRequest 
– Option to Validate Only (IsCheckOnly) 
• Keep retrieving until the State is no 
longer Queued. 
• Delete MetadataContainer 
New – no existing ID 
• Call create and collect the SaveResults 
• Or create an empty stub class to get an 
ID and use the MetadataContainer
Tooling API deployment 
Existing ID 
• Create a MetadataContainer with a 
unique name 
• Create a collection of 
ApexClassMember referencing the 
MetadataContainerId 
• Create a ContainerAsyncRequest 
New – no existing ID 
• Call create and collect the SaveResults 
• Or create an empty stub class to get an 
ID and use the MetadataContainer 
List<ApexClass> apexClassesToInsert = new List<ApexClass>(); 
// Add ApexClass records with T4 generated Body 
ApexClass classToInsert = new ApexClass() { Name = "HelloDF" }; 
classToInsert.Body = "public class " + classToInsert.Name + " { public class Add{ }}"; 
apexClasses.Add(classToInsert); 
– Option to Validate Only (IsCheckOnly) 
• Keep retrieving until the State is no 
longer Queued. 
• Delete MetadataContainer 
SaveResult[] saveResults = toolingService.create(apexClassesToInsert.ToArray()); 
if (saveResults != null) { 
foreach (SaveResult sr in saveResults) { 
if (!sr.success) { 
throw new ToolingCreateException(apexClassesToInsert.ToArray(), saveResults); 
} 
} 
}
Tooling API deployment 
Existing ID 
• Create a MetadataContainer with a 
unique name 
• Create a collection of 
ApexClassMember referencing the 
MetadataContainerId 
• Create a ContainerAsyncRequest 
New – no existing ID 
• Call create and collect the SaveResults 
• Or create an empty stub class to get an 
MIeDta adantda Cuosntea ithneer McoenttaadianetarC=onnetwaiMneetradataContainer(); 
– Option to Validate Only (IsCheckOnly) 
• Keep retrieving until the State is no 
longer Queued. 
• Delete MetadataContainer 
// max length 32 characters! 
container.Name = "UAC " + DateTime.Now.Ticks; 
SaveResult[] containerResults = toolingService.create(new sObject[] { container }); 
if (!containerResults[0].success) { 
throw new ToolingCreateException(container, containerResults[0]); 
} 
Id metadataContainerId = new Id(containerResults[0].id);
Tooling API deployment 
Existing ID 
• Create a MetadataContainer with a 
unique name 
• Create a collection of 
ApexClassMember referencing the 
MetadataContainerId 
• Create a ContainerAsyncRequest 
– Option to Validate Only (IsCheckOnly) 
• Keep retrieving until the State is no 
longer Queued. 
• Delete MetadataContainer 
New – no existing ID 
• Call create and collect the SaveResults 
• Or create an empty stub class to get an 
ID and use the MetadataContainer 
var toUpdate = new List<ApexClassMember>(); 
foreach(ApexClass ac in classesToUpsert) { 
var acm = new ApexClassMember(); 
acm.ContentEntityId = ac.Id; // 01p… 
acm.Body = ac.Body; // T4 Template output 
acm.FullName = ac.Name; // class name 
acm.MetadataContainerId = 
metadataContainerId.CaseSafeID; 
toUpdate.Add(acm); 
} 
sObject[] toCreate = toUpdate.ToArray(); 
SaveResult[] cResult = 
toolingService.create(apexClassMembersToCreate); 
foreach (SaveResult sr in cResult) { 
if (!sr.success) { 
throw new ToolingCreateException(toCreate, 
cResult); 
} 
}
Tooling API deployment 
Existing ID 
• Create a MetadataContainer with a 
unique name 
• Create a collection of 
ApexClassMember referencing the 
MetadataContainerId 
• Create a ContainerAsyncRequest 
– Option to Validate Only (IsCheckOnly) 
• Keep retrieving until the State is no 
longer Queued. 
• Delete MetadataContainer 
var cr = new ContainerAsyncRequest(); 
cr.MetadataContainerId = 
metadataContainerId.CaseSafeID; 
cr.IsCheckOnly = false; 
SaveResult[] cars = this.create(new sObject[]{cr}); 
if (! cars[0].success) { 
throw new ToolingCreateException(cr,cars[0]); 
} 
ContainerAsyncRequest retrieve = 
WaitForClassToUpdate(containerAsyncResults); 
if (retrieve.State == "Failed") { 
throw ApexUpdateException.FromDeployDetails 
(retrieve.DeployDetails); 
} 
DeleteResult[] dr = this.delete(new string[] 
{ metadataContainerId.CaseSafeID });
WSDL Variation 
http://www.superbwallpapers.com/photography/snowflakes-10358/ 
If you have a unique WSDL: 
• http://www.fuseit.com/wsdlhelp 
• Please provide the WSDL details 
Use HTTP Requests for 
WebServiceCallout.invoke 
limits
Summary 
•Manually dealing with WSDL import errors is time consuming 
and error prone 
• Extended SOAP support for several common WSDL issues: 
– Increased support – <xsd:import> <xsd:include> <xsd:extension> 
– Generate basic code coverage 
– Method filtering to reduce Apex
Q&A 
+ What Next 
• Download: the free FuseIT SFDC Explorer Tool (or get the web version) 
http://www.fuseit.com/explorer 
• Idea: Run anonymous apex as if it were a test case 
http://goo.gl/Aci1ys 
• Salesforce: The now open source WSDL2Apex generator 
http://goo.gl/tUcnVj 
• Session: Building Callouts Without WSDL2Apex and Apex Parsers 
Tuesday, 4:00 PM - 4:30 PM | Moscone Center West | Mobile Theater 
www.fuseit.com 
@FishOfPrey 
www.fishofprey.com 
@GirishaArora 
Girisha Arora
Using the Tooling API to Generate Apex SOAP Web Service Clients
Bonus Slides
Handling Extensions 
• <xsd:extension base=“”/> 
• Copy fields from base type to the 
sub class. 
• Use extends in the future 
• Metadata API 
• AccountOwnerSharingRule extends 
• OwnerSharingRule extends 
• BaseSharingRule extends 
• Metadata
HTTP Requests 
• When WebServiceCallout.invoke() fails 
• A template for supporting more complex callouts 
• Access full fault messages 
SOAPFault Information for Apex 
https://success.salesforce.com/ideaView?id=08730000000BqG9AAK
Apex Class Drifting with WSDL changes
Ad

More Related Content

What's hot (20)

Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
Wen-Tien Chang
 
Lecture 3: Servlets - Session Management
Lecture 3:  Servlets - Session ManagementLecture 3:  Servlets - Session Management
Lecture 3: Servlets - Session Management
Fahad Golra
 
Comment utiliser Visual Studio Code pour travailler avec une scratch Org
Comment utiliser Visual Studio Code pour travailler avec une scratch OrgComment utiliser Visual Studio Code pour travailler avec une scratch Org
Comment utiliser Visual Studio Code pour travailler avec une scratch Org
Thierry TROUIN ☁
 
ERRest
ERRestERRest
ERRest
WO Community
 
Backbone js
Backbone jsBackbone js
Backbone js
Knoldus Inc.
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
WO Community
 
Spray - Build RESTfull services in scala
Spray - Build RESTfull services in scalaSpray - Build RESTfull services in scala
Spray - Build RESTfull services in scala
Sandeep Purohit
 
SDPHP Lightning Talk - Let's Talk Laravel
SDPHP Lightning Talk - Let's Talk LaravelSDPHP Lightning Talk - Let's Talk Laravel
SDPHP Lightning Talk - Let's Talk Laravel
marcusamoore
 
70562 (1)
70562 (1)70562 (1)
70562 (1)
Pragya Rastogi
 
Créer et gérer une scratch org avec Visual Studio Code
Créer et gérer une scratch org avec Visual Studio CodeCréer et gérer une scratch org avec Visual Studio Code
Créer et gérer une scratch org avec Visual Studio Code
Thierry TROUIN ☁
 
ERRest in Depth
ERRest in DepthERRest in Depth
ERRest in Depth
WO Community
 
Remote code-with-expression-language-injection
Remote code-with-expression-language-injectionRemote code-with-expression-language-injection
Remote code-with-expression-language-injection
Mickey Jack
 
Barcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentationBarcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentation
Sociable
 
KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
WO Community
 
IoC with PHP
IoC with PHPIoC with PHP
IoC with PHP
Chris Weldon
 
Activator and Reactive at Play NYC meetup
Activator and Reactive at Play NYC meetupActivator and Reactive at Play NYC meetup
Activator and Reactive at Play NYC meetup
Henrik Engström
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Balint Erdi
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
Ted Pennings
 
ERRest - The Next Steps
ERRest - The Next StepsERRest - The Next Steps
ERRest - The Next Steps
WO Community
 
Cloudformation101
Cloudformation101Cloudformation101
Cloudformation101
Dave Pigliavento
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
Wen-Tien Chang
 
Lecture 3: Servlets - Session Management
Lecture 3:  Servlets - Session ManagementLecture 3:  Servlets - Session Management
Lecture 3: Servlets - Session Management
Fahad Golra
 
Comment utiliser Visual Studio Code pour travailler avec une scratch Org
Comment utiliser Visual Studio Code pour travailler avec une scratch OrgComment utiliser Visual Studio Code pour travailler avec une scratch Org
Comment utiliser Visual Studio Code pour travailler avec une scratch Org
Thierry TROUIN ☁
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
WO Community
 
Spray - Build RESTfull services in scala
Spray - Build RESTfull services in scalaSpray - Build RESTfull services in scala
Spray - Build RESTfull services in scala
Sandeep Purohit
 
SDPHP Lightning Talk - Let's Talk Laravel
SDPHP Lightning Talk - Let's Talk LaravelSDPHP Lightning Talk - Let's Talk Laravel
SDPHP Lightning Talk - Let's Talk Laravel
marcusamoore
 
Créer et gérer une scratch org avec Visual Studio Code
Créer et gérer une scratch org avec Visual Studio CodeCréer et gérer une scratch org avec Visual Studio Code
Créer et gérer une scratch org avec Visual Studio Code
Thierry TROUIN ☁
 
Remote code-with-expression-language-injection
Remote code-with-expression-language-injectionRemote code-with-expression-language-injection
Remote code-with-expression-language-injection
Mickey Jack
 
Barcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentationBarcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentation
Sociable
 
Activator and Reactive at Play NYC meetup
Activator and Reactive at Play NYC meetupActivator and Reactive at Play NYC meetup
Activator and Reactive at Play NYC meetup
Henrik Engström
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
Ted Pennings
 
ERRest - The Next Steps
ERRest - The Next StepsERRest - The Next Steps
ERRest - The Next Steps
WO Community
 

Viewers also liked (19)

Using Node.js for Mocking Apex Web Services
Using Node.js for Mocking Apex Web ServicesUsing Node.js for Mocking Apex Web Services
Using Node.js for Mocking Apex Web Services
Jeff Douglas
 
Parsing XML & JSON in Apex
Parsing XML & JSON in ApexParsing XML & JSON in Apex
Parsing XML & JSON in Apex
Abhinav Gupta
 
Salesforce Apex Language Reference
Salesforce Apex Language ReferenceSalesforce Apex Language Reference
Salesforce Apex Language Reference
salesforcer
 
APEX & MTdoxx
APEX & MTdoxxAPEX & MTdoxx
APEX & MTdoxx
MT AG
 
Getting Started With Apex REST Services
Getting Started With Apex REST ServicesGetting Started With Apex REST Services
Getting Started With Apex REST Services
Salesforce Developers
 
Integrations with the Force.com Platform Using Custom Apex REST Services
Integrations with the Force.com Platform Using Custom Apex REST ServicesIntegrations with the Force.com Platform Using Custom Apex REST Services
Integrations with the Force.com Platform Using Custom Apex REST Services
Salesforce Developers
 
Forcelandia 2015
Forcelandia 2015Forcelandia 2015
Forcelandia 2015
Jeff Douglas
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
Sanchit Dua
 
Salesforce asynchronous apex
Salesforce asynchronous apexSalesforce asynchronous apex
Salesforce asynchronous apex
Badan Singh Pundeer
 
Integrate with External Systems using Apex Callouts
Integrate with External Systems using Apex CalloutsIntegrate with External Systems using Apex Callouts
Integrate with External Systems using Apex Callouts
Salesforce Developers
 
Using the Google SOAP API
Using the Google SOAP APIUsing the Google SOAP API
Using the Google SOAP API
Salesforce Developers
 
Batchable vs @future vs Queueable
Batchable vs @future vs QueueableBatchable vs @future vs Queueable
Batchable vs @future vs Queueable
Boris Bachovski
 
Using Apex for REST Integration
Using Apex for REST IntegrationUsing Apex for REST Integration
Using Apex for REST Integration
Salesforce Developers
 
SalesForce WebServices part 2
SalesForce WebServices part 2SalesForce WebServices part 2
SalesForce WebServices part 2
Mindfire Solutions
 
Secure Salesforce: External App Integrations
Secure Salesforce: External App IntegrationsSecure Salesforce: External App Integrations
Secure Salesforce: External App Integrations
Salesforce Developers
 
Exploring the Salesforce REST API
Exploring the Salesforce REST APIExploring the Salesforce REST API
Exploring the Salesforce REST API
Salesforce Developers
 
Advanced Platform Series - OAuth and Social Authentication
Advanced Platform Series - OAuth and Social AuthenticationAdvanced Platform Series - OAuth and Social Authentication
Advanced Platform Series - OAuth and Social Authentication
Salesforce Developers
 
Make Your App Lightning Ready with Winter '17 (December 8, 2016)
Make Your App Lightning Ready with Winter '17 (December 8, 2016)Make Your App Lightning Ready with Winter '17 (December 8, 2016)
Make Your App Lightning Ready with Winter '17 (December 8, 2016)
Salesforce Partners
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex code
EdwinOstos
 
Using Node.js for Mocking Apex Web Services
Using Node.js for Mocking Apex Web ServicesUsing Node.js for Mocking Apex Web Services
Using Node.js for Mocking Apex Web Services
Jeff Douglas
 
Parsing XML & JSON in Apex
Parsing XML & JSON in ApexParsing XML & JSON in Apex
Parsing XML & JSON in Apex
Abhinav Gupta
 
Salesforce Apex Language Reference
Salesforce Apex Language ReferenceSalesforce Apex Language Reference
Salesforce Apex Language Reference
salesforcer
 
APEX & MTdoxx
APEX & MTdoxxAPEX & MTdoxx
APEX & MTdoxx
MT AG
 
Getting Started With Apex REST Services
Getting Started With Apex REST ServicesGetting Started With Apex REST Services
Getting Started With Apex REST Services
Salesforce Developers
 
Integrations with the Force.com Platform Using Custom Apex REST Services
Integrations with the Force.com Platform Using Custom Apex REST ServicesIntegrations with the Force.com Platform Using Custom Apex REST Services
Integrations with the Force.com Platform Using Custom Apex REST Services
Salesforce Developers
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
Sanchit Dua
 
Integrate with External Systems using Apex Callouts
Integrate with External Systems using Apex CalloutsIntegrate with External Systems using Apex Callouts
Integrate with External Systems using Apex Callouts
Salesforce Developers
 
Batchable vs @future vs Queueable
Batchable vs @future vs QueueableBatchable vs @future vs Queueable
Batchable vs @future vs Queueable
Boris Bachovski
 
Secure Salesforce: External App Integrations
Secure Salesforce: External App IntegrationsSecure Salesforce: External App Integrations
Secure Salesforce: External App Integrations
Salesforce Developers
 
Advanced Platform Series - OAuth and Social Authentication
Advanced Platform Series - OAuth and Social AuthenticationAdvanced Platform Series - OAuth and Social Authentication
Advanced Platform Series - OAuth and Social Authentication
Salesforce Developers
 
Make Your App Lightning Ready with Winter '17 (December 8, 2016)
Make Your App Lightning Ready with Winter '17 (December 8, 2016)Make Your App Lightning Ready with Winter '17 (December 8, 2016)
Make Your App Lightning Ready with Winter '17 (December 8, 2016)
Salesforce Partners
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex code
EdwinOstos
 
Ad

Similar to Using the Tooling API to Generate Apex SOAP Web Service Clients (20)

Local data storage for mobile apps
Local data storage for mobile appsLocal data storage for mobile apps
Local data storage for mobile apps
Ivano Malavolta
 
AWS Java SDK @ scale
AWS Java SDK @ scaleAWS Java SDK @ scale
AWS Java SDK @ scale
Tomasz Kowalczewski
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web apps
Ivano Malavolta
 
Swift Micro-services and AWS Technologies
Swift Micro-services and AWS TechnologiesSwift Micro-services and AWS Technologies
Swift Micro-services and AWS Technologies
SimonPilkington8
 
DDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCDDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVC
Andy Butland
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
Chui-Wen Chiu
 
Using Java to implement SOAP Web Services: JAX-WS
Using Java to implement SOAP Web Services: JAX-WS�Using Java to implement SOAP Web Services: JAX-WS�
Using Java to implement SOAP Web Services: JAX-WS
Katrien Verbert
 
JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)
Talha Ocakçı
 
Cassandra Day Chicago 2015: Building Java Applications with Apache Cassandra
Cassandra Day Chicago 2015: Building Java Applications with Apache CassandraCassandra Day Chicago 2015: Building Java Applications with Apache Cassandra
Cassandra Day Chicago 2015: Building Java Applications with Apache Cassandra
DataStax Academy
 
Practical OData
Practical ODataPractical OData
Practical OData
Vagif Abilov
 
Query service in vCloud Director
Query service in vCloud DirectorQuery service in vCloud Director
Query service in vCloud Director
Mayank Goyal
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
oazabir
 
S313431 JPA 2.0 Overview
S313431 JPA 2.0 OverviewS313431 JPA 2.0 Overview
S313431 JPA 2.0 Overview
Ludovic Champenois
 
Google apps script database abstraction exposed version
Google apps script database abstraction   exposed versionGoogle apps script database abstraction   exposed version
Google apps script database abstraction exposed version
Bruce McPherson
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
DsixE Inc
 
WinAppDriver Development
WinAppDriver DevelopmentWinAppDriver Development
WinAppDriver Development
Jeremy Kao
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
Christian Melchior
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core Data
Make School
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
FIWARE
 
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixOSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
Manish Pandit
 
Local data storage for mobile apps
Local data storage for mobile appsLocal data storage for mobile apps
Local data storage for mobile apps
Ivano Malavolta
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web apps
Ivano Malavolta
 
Swift Micro-services and AWS Technologies
Swift Micro-services and AWS TechnologiesSwift Micro-services and AWS Technologies
Swift Micro-services and AWS Technologies
SimonPilkington8
 
DDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCDDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVC
Andy Butland
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
Chui-Wen Chiu
 
Using Java to implement SOAP Web Services: JAX-WS
Using Java to implement SOAP Web Services: JAX-WS�Using Java to implement SOAP Web Services: JAX-WS�
Using Java to implement SOAP Web Services: JAX-WS
Katrien Verbert
 
JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)JAVA EE DEVELOPMENT (JSP and Servlets)
JAVA EE DEVELOPMENT (JSP and Servlets)
Talha Ocakçı
 
Cassandra Day Chicago 2015: Building Java Applications with Apache Cassandra
Cassandra Day Chicago 2015: Building Java Applications with Apache CassandraCassandra Day Chicago 2015: Building Java Applications with Apache Cassandra
Cassandra Day Chicago 2015: Building Java Applications with Apache Cassandra
DataStax Academy
 
Query service in vCloud Director
Query service in vCloud DirectorQuery service in vCloud Director
Query service in vCloud Director
Mayank Goyal
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
oazabir
 
Google apps script database abstraction exposed version
Google apps script database abstraction   exposed versionGoogle apps script database abstraction   exposed version
Google apps script database abstraction exposed version
Bruce McPherson
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
DsixE Inc
 
WinAppDriver Development
WinAppDriver DevelopmentWinAppDriver Development
WinAppDriver Development
Jeremy Kao
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
Christian Melchior
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core Data
Make School
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
FIWARE
 
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixOSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
Manish Pandit
 
Ad

Recently uploaded (20)

Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5..."Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
Fwdays
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5..."Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
Fwdays
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 

Using the Tooling API to Generate Apex SOAP Web Service Clients

  • 1. Using the Tooling API to Generate Apex SOAP Web Service Clients Daniel Ballinger Senior Developer @FishOfPrey
  • 2. Daniel Ballinger Senior Developer @FishOfPrey
  • 3. Have you ever seen… Feature Limits Apex and Deployment No file chosen Choose File Error: Failed to parse wsdl: Unknown element: import No file chosen Choose File Error: Failed to parse wsdl: Found more than one wsdl:binding. WSDL with multiple binding not supported Apex Generation Failed Unsupported WSDL. Found more than one part for message XAVRequestMessage Apex Generation Failed Unsupported schema type: {http://www.w3.org/2001/XMLSchema}anyType Apex Generation Failed The total size of apex code in this application after removing comments exceeds the maximum character size of 3000000 Apex Generation Failed Class name 'toolingSoapSforceCom' already in use. Please delete this class or specify a new class name Supported WSDL Features http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm#supported_wsdls_topic-title
  • 4. In This Session •The FuseIT SFDC Explorer tool • Existing Salesforce WSDL functionality •Demo custom WSDL to Apex tooling •How it was made
  • 5. The FuseIT SFDC Explorer Tool – FusesFriend • Features • Windows only for the full tool • Basic web version of WSDL tooling – Session management – Schema Explorer + Tooling API – SOQL queries – Running Test Cases – Debug Log Monitoring – Data Export Retrieval – Anonymous Apex – Code Coverage – WSDL import to Apex http://www.fuseit.com/explorer
  • 6. Unsupported feature Existing WSDL2Apex Experience WSDL > 1 MB <xsd:import> <xsd:include> Existing Class Name Manually Edit WSDL Superfluous bindings Download single WSDL Generate from WSDL Upload single WSDL Namespaces to Classes Generate Apex Code Call Generated Code
  • 7. Shaving the [WSDL] Yak “Yak shaving is what you are doing when you're doing some stupid, fiddly little task that bears no obvious relationship to what you're supposed to be working on, but yet a chain of twelve causal relations links what you're doing to the original meta-task.” Scott Hanselman Photo by Dennis Jarvis CC BY-SA 3.0
  • 9. The IT Crowd – Series 1 Episode 2: Fire!
  • 10. Code Coverage Testing for Generated Code •Need to implement WebServiceMock Interface • Invoke each web service method •Handle Request and Response types •Supporting Types (Headers)
  • 11. Demo SFDC Explorer Web Service Mock
  • 12. The Metadata API – Handling larger WSDLs Class name 'Metadata' already in use. Please edit WSDL to remove repeated names • CustomObject et al. extend Metadata and need elements from it to work correctly. <xs:extension base="Metadata"> • 330 KB WSDL Apex Character Limit Metadata 590,915 Remaining • 590,915 characters / 6740 lines without comments • Approximately 20% of 3,000,000 character Apex limit
  • 13. Method filtering functionality •Reduces amount of generated code •Reduces testing requirements for dead code • Potentially skips unsupported features • Optionally remove supporting Apex classes
  • 14. Demo SFDC Explorer Method filtering
  • 15. How it works Deploy to Salesforce • Tooling API to deploy all associated Apex classes at once Transform to Apex • T4 (Text Template Transformation Toolkit)Templates to convert the object model into Apex Build Apex Model • C# Object Model of Apex Classes, Members and Methods Parse WSDL • Import all WSDL data and extract required elements
  • 16. .NET Representation of Apex Class model ApexClass 1 InnerApexClasses * Members * Methods ApexClassCollection ApexMember StringArrayApexMember ApexMethod ApexMethodParameter ApexMethodHttp ReturnType ReturnVoid ReturnPrimitive ReturnClassType Type Infos Inner Classes Namespace Collection Parameters * ReturnType 1 ApexClasses 0..* Outer class for each Namespace Created for the Port/Service Each Request/Response
  • 17. Tooling API deployment Existing ID • Create a MetadataContainer with a unique name • Create a collection of ApexClassMember referencing the MetadataContainerId • Create a ContainerAsyncRequest – Option to Validate Only (IsCheckOnly) • Keep retrieving until the State is no longer Queued. • Delete MetadataContainer New – no existing ID • Call create and collect the SaveResults • Or create an empty stub class to get an ID and use the MetadataContainer
  • 18. Tooling API deployment Existing ID • Create a MetadataContainer with a unique name • Create a collection of ApexClassMember referencing the MetadataContainerId • Create a ContainerAsyncRequest New – no existing ID • Call create and collect the SaveResults • Or create an empty stub class to get an ID and use the MetadataContainer List<ApexClass> apexClassesToInsert = new List<ApexClass>(); // Add ApexClass records with T4 generated Body ApexClass classToInsert = new ApexClass() { Name = "HelloDF" }; classToInsert.Body = "public class " + classToInsert.Name + " { public class Add{ }}"; apexClasses.Add(classToInsert); – Option to Validate Only (IsCheckOnly) • Keep retrieving until the State is no longer Queued. • Delete MetadataContainer SaveResult[] saveResults = toolingService.create(apexClassesToInsert.ToArray()); if (saveResults != null) { foreach (SaveResult sr in saveResults) { if (!sr.success) { throw new ToolingCreateException(apexClassesToInsert.ToArray(), saveResults); } } }
  • 19. Tooling API deployment Existing ID • Create a MetadataContainer with a unique name • Create a collection of ApexClassMember referencing the MetadataContainerId • Create a ContainerAsyncRequest New – no existing ID • Call create and collect the SaveResults • Or create an empty stub class to get an MIeDta adantda Cuosntea ithneer McoenttaadianetarC=onnetwaiMneetradataContainer(); – Option to Validate Only (IsCheckOnly) • Keep retrieving until the State is no longer Queued. • Delete MetadataContainer // max length 32 characters! container.Name = "UAC " + DateTime.Now.Ticks; SaveResult[] containerResults = toolingService.create(new sObject[] { container }); if (!containerResults[0].success) { throw new ToolingCreateException(container, containerResults[0]); } Id metadataContainerId = new Id(containerResults[0].id);
  • 20. Tooling API deployment Existing ID • Create a MetadataContainer with a unique name • Create a collection of ApexClassMember referencing the MetadataContainerId • Create a ContainerAsyncRequest – Option to Validate Only (IsCheckOnly) • Keep retrieving until the State is no longer Queued. • Delete MetadataContainer New – no existing ID • Call create and collect the SaveResults • Or create an empty stub class to get an ID and use the MetadataContainer var toUpdate = new List<ApexClassMember>(); foreach(ApexClass ac in classesToUpsert) { var acm = new ApexClassMember(); acm.ContentEntityId = ac.Id; // 01p… acm.Body = ac.Body; // T4 Template output acm.FullName = ac.Name; // class name acm.MetadataContainerId = metadataContainerId.CaseSafeID; toUpdate.Add(acm); } sObject[] toCreate = toUpdate.ToArray(); SaveResult[] cResult = toolingService.create(apexClassMembersToCreate); foreach (SaveResult sr in cResult) { if (!sr.success) { throw new ToolingCreateException(toCreate, cResult); } }
  • 21. Tooling API deployment Existing ID • Create a MetadataContainer with a unique name • Create a collection of ApexClassMember referencing the MetadataContainerId • Create a ContainerAsyncRequest – Option to Validate Only (IsCheckOnly) • Keep retrieving until the State is no longer Queued. • Delete MetadataContainer var cr = new ContainerAsyncRequest(); cr.MetadataContainerId = metadataContainerId.CaseSafeID; cr.IsCheckOnly = false; SaveResult[] cars = this.create(new sObject[]{cr}); if (! cars[0].success) { throw new ToolingCreateException(cr,cars[0]); } ContainerAsyncRequest retrieve = WaitForClassToUpdate(containerAsyncResults); if (retrieve.State == "Failed") { throw ApexUpdateException.FromDeployDetails (retrieve.DeployDetails); } DeleteResult[] dr = this.delete(new string[] { metadataContainerId.CaseSafeID });
  • 22. WSDL Variation http://www.superbwallpapers.com/photography/snowflakes-10358/ If you have a unique WSDL: • http://www.fuseit.com/wsdlhelp • Please provide the WSDL details Use HTTP Requests for WebServiceCallout.invoke limits
  • 23. Summary •Manually dealing with WSDL import errors is time consuming and error prone • Extended SOAP support for several common WSDL issues: – Increased support – <xsd:import> <xsd:include> <xsd:extension> – Generate basic code coverage – Method filtering to reduce Apex
  • 24. Q&A + What Next • Download: the free FuseIT SFDC Explorer Tool (or get the web version) http://www.fuseit.com/explorer • Idea: Run anonymous apex as if it were a test case http://goo.gl/Aci1ys • Salesforce: The now open source WSDL2Apex generator http://goo.gl/tUcnVj • Session: Building Callouts Without WSDL2Apex and Apex Parsers Tuesday, 4:00 PM - 4:30 PM | Moscone Center West | Mobile Theater www.fuseit.com @FishOfPrey www.fishofprey.com @GirishaArora Girisha Arora
  • 27. Handling Extensions • <xsd:extension base=“”/> • Copy fields from base type to the sub class. • Use extends in the future • Metadata API • AccountOwnerSharingRule extends • OwnerSharingRule extends • BaseSharingRule extends • Metadata
  • 28. HTTP Requests • When WebServiceCallout.invoke() fails • A template for supporting more complex callouts • Access full fault messages SOAPFault Information for Apex https://success.salesforce.com/ideaView?id=08730000000BqG9AAK
  • 29. Apex Class Drifting with WSDL changes