SlideShare a Scribd company logo
Building Callouts without WSDL2Apex
or Apex Parser
Ming Yuan
Solution Architect
Zurich North America
Welcome
Zurich Insurance Group (Zurich) is a leading multi-line insurance provider with a global network of
subsidiaries and offices in Europe, North America, Latin America, Asia-Pacific and the Middle East as
well as other markets. For more information about the products and services it offers and people
Zurich employs around the world, go to http://www.zurichna.com/zna/aboutzurich/zna-home.htm.
In North America, Zurich (www.zurichna.com) is a leading commercial property-casualty insurance
provider serving the global corporate, large corporate, middle markets, specialties and programs
sectors. In addition, Zurich also offers life insurance products and services. 2012 marks Zurich’s 100
year anniversary of insuring America and the success of its customers, shareholders and employees.
Further information about Zurich’s 100 year anniversary of insuring America is available at
http://www.zurichna.com/100.
Architecture Landscape
• SFDC is the strategic platform to provide single-pane-of-glass user experience
• Service-Oriented Architecture established enterprise-wide
– SFDC exchanges data with on-premise applications via Enterprise Service Bus (ESB)
EnterpriseServiceBus
The Challenge is..
• Existing service contracts (defined in WSDLs) are based on IBM’s Industry Model
for Insurance
• These WSDLs uncovered some limitations of the WSDL2Apex tool
– Unsupported data types
– Complex namespace inheritance structure
– Multiple XSD imports into a single WSDL; otherwise a consolidated WSDL may exceed size limit
• Known workaround options didn’t work well
– Manually trim down each WSDL to fit in WSDL2Apex
– Develop custom APEX parser per service
POC: WSDL2Apex Stub vs. Framework
Results captured, with permissions to use, from http://www.villagechief.com/product/codescan
Overview of the Framework
• An abstract base class for requests
– Represents all type of requests
– Allows developers to inject logic to generate actual XML requests
• A generic XML parser class
– Parses XML stream into Map structures
• A common response class
– Checks the status of invocation
– Manages the Maps (containing data and metadata)
– Retrieves values using XPath-like keys
Sample Request Class – Per Service Endpoint
public class WeatherRequest extends EasySOARequest {
private String zipCode = ‘’;
public WeatherRequest() {
super();
httpMethod = 'POST';
endpoint = 'http://wsf.cdyne.com/WeatherWS/Weather.asmx';
headers.put('Content-Type', 'text/xml; charset=utf-8');
timeOut = 120000;
}
public void setZipCode(String s) {zipcode = s;}
public override String getPayload() {
return getSOAPRequest(‘<GetCityForecastByZIP><ZIP>’ + zipcode +
‘</ZIP></GetCityForecastByZIP>‘);
}
}
/ForecastReturn/State
/ForecastReturn/City
/ForecastReturn/WeatherStationCity
/ForecastReturn/ForecastResult/Forecast/Date
/ForecastReturn/ForecastResult/Forecast/WeatherID
/ForecastReturn/ForecastResult/Forecast/Description
/ForecastReturn/ForecastResult/Forecast__1/Date
/ForecastReturn/ForecastResult/Forecast__1/WeatherID
/ForecastReturn/ForecastResult/Forecast__1/Description
Keys for data storage
/ForecastReturn/State
/ForecastReturn/City
/ForecastReturn/WeatherStationCity
/ForecastReturn/ForecastResult/Forecast/Date (/0/0/0/0)
/ForecastReturn/ForecastResult/Forecast/WeatherID (/0/0/0/0)
/ForecastReturn/ForecastResult/Forecast/Description (/0/0/0/0)
/ForecastReturn/ForecastResult/Forecast/Date (/0/0/1/0)
/ForecastReturn/ForecastResult/Forecast/WeatherID (/0/0/1/0)
/ForecastReturn/ForecastResult/Forecast/Description (/0/0/1/0)
Keys for data retrieval
The Generic Parse – from XML to Maps
<ForecastReturn>
<State>IL</State>
<City>Arlington Heights</City>
<WeatherStationCity>
Waukegan
</WeatherStationCity>
<ForecastResult>
<Forecast>
<Date>
2014-08-14T00:00:00
</Date>
<WeatherID>4</WeatherID>
<Description>
Sunny
</Description>
</Forecast>
<Forecast>
<Date>
2014-08-15T00:00:00
</Date>
<WeatherID>2</WeatherID>
<Description>
Partly Cloudy
</Description>
</Forecast>
</ForecastResult>
</ForecastReturn>
The Response Class – Data Retrieval
• Simple responses
– response.retrieveElement(xpath)
– response.retrieveElements(List<String> xpaths)
• Responses with collections
– response.getNumberOfSiblings(xpath)
– response.getNumberOfSiblings(xpath, indexpath)
– response.retrieveElement(xpath, indexpath)
– response.retrieveImmediateValuesInCollection(xpath, indexpath)
– response.retrieveUniqueValuesInCollection(xpath, indexpath)
– response.retrieveAllValuesInCollection(xpath, indexpath)
– response.retrieveValuesFromSiblings(xpath, indexpath)
• Advanced methods
– response.createNewSObject(String name, Map<String, String> mappings)
– response.createNewSObject(String name, Map<String, String> mappings, List<String> defaults)
– response.populateFields(SObject s, Map<String, String> mappings)
– response.populateFields(SObject s, Map<String, String> mappings, List<String> defaults)
• Backdoor method for development
– response.debugAndLog()
How the Framework Works..
2: populateReqData
4: callout
6: isValid
8: retrieveElements
Sample Invoker Class – Pattern-Based Development
// initiate a request object
WeatherRequest req = new WeatherRequest();
req.setZipCode(myAccount.zipcode);
// make the callout
EasySOAResponse resp = req.callout();
// check the status of a callout
if (! resp.isValid()) {
// handle exception;
}
// process data in the response
myAccount.WeatherStation = resp.retrieveElement(‘/ForecastReturn/WeatherStationCity’);
More Enriched Features
• Built out one more generic parser for JSON
• Support dynamically creating or populating Sobjects
Map<String, String> m = EasySOAHelper.getMappingRules(‘MyMappingRules__c');
resp.createNewSObject(‘MySObject', m);
Or
Map<String, String> m = EasySOAHelper.getMappingRules(‘MyMappingRules__c');
MySObject obj = new MySObject();
resp.populateFields(obj, m);
• Published a managed package – “Easy XML, JSON and Web Services”
https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000B5DqiEAF
Goals Achieved; Uncovered Hidden Gems!
• Time saving in development phase per service
• Single set of APIs for SOAP, JSON, or Restful web services
• Highly configurable module supporting dynamic modifications
• Leverages WS-Security headers programmatically
• Significant reduction in code base
• True parallel development among SFDC development team, Service modeling
team, and Service implementation team
Appendix: The Whole Set of Framework Classes

More Related Content

What's hot

Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to CSS Grid Layout
Rachel Andrew
 
The New CSS Layout - dotCSS
The New CSS Layout - dotCSSThe New CSS Layout - dotCSS
The New CSS Layout - dotCSS
Rachel Andrew
 
CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016
Rachel Andrew
 
Future Layout & Performance
Future Layout & PerformanceFuture Layout & Performance
Future Layout & Performance
Rachel Andrew
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
Rachel Andrew
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
Rachel Andrew
 
Frontend United: Start using CSS Grid Layout today!
Frontend United: Start using CSS Grid Layout today!Frontend United: Start using CSS Grid Layout today!
Frontend United: Start using CSS Grid Layout today!
Rachel Andrew
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid Layout
Rachel Andrew
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
Rachel Andrew
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid Layout
Rachel Andrew
 
CSS Grid
CSS GridCSS Grid
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
Igalia
 
ConFoo 2016: Making Sense of CSS Layout
ConFoo 2016: Making Sense of CSS LayoutConFoo 2016: Making Sense of CSS Layout
ConFoo 2016: Making Sense of CSS Layout
Rachel Andrew
 
CSS Grid Layout - All Things Open
CSS Grid Layout - All Things OpenCSS Grid Layout - All Things Open
CSS Grid Layout - All Things Open
Rachel Andrew
 
CSS Grid Changes Everything About Web Layouts: WordCamp Europe 2017
CSS Grid Changes Everything About Web Layouts: WordCamp Europe 2017CSS Grid Changes Everything About Web Layouts: WordCamp Europe 2017
CSS Grid Changes Everything About Web Layouts: WordCamp Europe 2017
Morten Rand-Hendriksen
 
Laying out the future
Laying out the futureLaying out the future
Laying out the future
Rachel Andrew
 
CSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NECSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NE
Rachel Andrew
 
Introducing CSS Grid
Introducing CSS GridIntroducing CSS Grid
Introducing CSS Grid
Jason Yingling
 
CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS Layout
Rachel Andrew
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
Rachel Andrew
 

What's hot (20)

Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to CSS Grid Layout
 
The New CSS Layout - dotCSS
The New CSS Layout - dotCSSThe New CSS Layout - dotCSS
The New CSS Layout - dotCSS
 
CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016
 
Future Layout & Performance
Future Layout & PerformanceFuture Layout & Performance
Future Layout & Performance
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
Frontend United: Start using CSS Grid Layout today!
Frontend United: Start using CSS Grid Layout today!Frontend United: Start using CSS Grid Layout today!
Frontend United: Start using CSS Grid Layout today!
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid Layout
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid Layout
 
CSS Grid
CSS GridCSS Grid
CSS Grid
 
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
CSS Grid Layout. Implementation status and roadmap (Webkit Contributors Meeti...
 
ConFoo 2016: Making Sense of CSS Layout
ConFoo 2016: Making Sense of CSS LayoutConFoo 2016: Making Sense of CSS Layout
ConFoo 2016: Making Sense of CSS Layout
 
CSS Grid Layout - All Things Open
CSS Grid Layout - All Things OpenCSS Grid Layout - All Things Open
CSS Grid Layout - All Things Open
 
CSS Grid Changes Everything About Web Layouts: WordCamp Europe 2017
CSS Grid Changes Everything About Web Layouts: WordCamp Europe 2017CSS Grid Changes Everything About Web Layouts: WordCamp Europe 2017
CSS Grid Changes Everything About Web Layouts: WordCamp Europe 2017
 
Laying out the future
Laying out the futureLaying out the future
Laying out the future
 
CSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NECSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NE
 
Introducing CSS Grid
Introducing CSS GridIntroducing CSS Grid
Introducing CSS Grid
 
CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS Layout
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 

Viewers also liked

Alimentación balanceada
Alimentación balanceadaAlimentación balanceada
Alimentación balanceada
Norielsy Freitez
 
Social Program July
Social Program JulySocial Program July
Social Program July
Gonçalo Costa
 
The changing face of software testing
The changing face of software testingThe changing face of software testing
The changing face of software testing
Bruce McLeod
 
Maru y-mili
Maru y-miliMaru y-mili
Maru y-mili
Carlos Sanchez
 
Print
PrintPrint
Pigeon Poop - You've got to learn to live with it...
Pigeon Poop - You've got to learn to live with it...Pigeon Poop - You've got to learn to live with it...
Pigeon Poop - You've got to learn to live with it...
Greg Gifford
 
The Best Social Program is a Job!
The Best Social Program is a Job!The Best Social Program is a Job!
The Best Social Program is a Job!
bodziana
 
Repair mechanisms of genetic material
Repair mechanisms of genetic materialRepair mechanisms of genetic material
Repair mechanisms of genetic material
LuisaGP96
 
Hays Plc Annual Report 2016
Hays Plc Annual Report 2016Hays Plc Annual Report 2016
Hays Plc Annual Report 2016
Hays
 
Risks and TCoR
Risks and TCoRRisks and TCoR
Risks and TCoR
kruijsse
 
Dawn Finch
Dawn FinchDawn Finch
Grow with HubSpot - Singapore - June 2016
Grow with HubSpot - Singapore - June 2016Grow with HubSpot - Singapore - June 2016
Grow with HubSpot - Singapore - June 2016
Ryan Bonnici
 
The miracle of the blood and heart. english
The miracle of the blood and heart. englishThe miracle of the blood and heart. english
The miracle of the blood and heart. english
HarunyahyaEnglish
 
文件自由日
文件自由日文件自由日
文件自由日
fweng322
 
Receta gazpacho andaluz olmeda origenes gourmet
Receta gazpacho andaluz olmeda origenes gourmetReceta gazpacho andaluz olmeda origenes gourmet
Receta gazpacho andaluz olmeda origenes gourmet
Olmeda Orígenes
 
The Introduction of Recruit Way In Offshore Dev. Scheme With FPT Software Mem...
The Introduction of Recruit Way In Offshore Dev. Scheme With FPT Software Mem...The Introduction of Recruit Way In Offshore Dev. Scheme With FPT Software Mem...
The Introduction of Recruit Way In Offshore Dev. Scheme With FPT Software Mem...
Recruit Technologies
 
Flyer Delitzscher str Häuser
Flyer Delitzscher str HäuserFlyer Delitzscher str Häuser
Flyer Delitzscher str Häuser
Christoph Sobotta
 
Νευροινιδιακη εκφυλιση και δενδριτικεσ αλλοιωσεισ
Νευροινιδιακη εκφυλιση και δενδριτικεσ αλλοιωσεισ Νευροινιδιακη εκφυλιση και δενδριτικεσ αλλοιωσεισ
Νευροινιδιακη εκφυλιση και δενδριτικεσ αλλοιωσεισ
csdtesting
 

Viewers also liked (18)

Alimentación balanceada
Alimentación balanceadaAlimentación balanceada
Alimentación balanceada
 
Social Program July
Social Program JulySocial Program July
Social Program July
 
The changing face of software testing
The changing face of software testingThe changing face of software testing
The changing face of software testing
 
Maru y-mili
Maru y-miliMaru y-mili
Maru y-mili
 
Print
PrintPrint
Print
 
Pigeon Poop - You've got to learn to live with it...
Pigeon Poop - You've got to learn to live with it...Pigeon Poop - You've got to learn to live with it...
Pigeon Poop - You've got to learn to live with it...
 
The Best Social Program is a Job!
The Best Social Program is a Job!The Best Social Program is a Job!
The Best Social Program is a Job!
 
Repair mechanisms of genetic material
Repair mechanisms of genetic materialRepair mechanisms of genetic material
Repair mechanisms of genetic material
 
Hays Plc Annual Report 2016
Hays Plc Annual Report 2016Hays Plc Annual Report 2016
Hays Plc Annual Report 2016
 
Risks and TCoR
Risks and TCoRRisks and TCoR
Risks and TCoR
 
Dawn Finch
Dawn FinchDawn Finch
Dawn Finch
 
Grow with HubSpot - Singapore - June 2016
Grow with HubSpot - Singapore - June 2016Grow with HubSpot - Singapore - June 2016
Grow with HubSpot - Singapore - June 2016
 
The miracle of the blood and heart. english
The miracle of the blood and heart. englishThe miracle of the blood and heart. english
The miracle of the blood and heart. english
 
文件自由日
文件自由日文件自由日
文件自由日
 
Receta gazpacho andaluz olmeda origenes gourmet
Receta gazpacho andaluz olmeda origenes gourmetReceta gazpacho andaluz olmeda origenes gourmet
Receta gazpacho andaluz olmeda origenes gourmet
 
The Introduction of Recruit Way In Offshore Dev. Scheme With FPT Software Mem...
The Introduction of Recruit Way In Offshore Dev. Scheme With FPT Software Mem...The Introduction of Recruit Way In Offshore Dev. Scheme With FPT Software Mem...
The Introduction of Recruit Way In Offshore Dev. Scheme With FPT Software Mem...
 
Flyer Delitzscher str Häuser
Flyer Delitzscher str HäuserFlyer Delitzscher str Häuser
Flyer Delitzscher str Häuser
 
Νευροινιδιακη εκφυλιση και δενδριτικεσ αλλοιωσεισ
Νευροινιδιακη εκφυλιση και δενδριτικεσ αλλοιωσεισ Νευροινιδιακη εκφυλιση και δενδριτικεσ αλλοιωσεισ
Νευροινιδιακη εκφυλιση και δενδριτικεσ αλλοιωσεισ
 

Similar to Building calloutswithoutwsdl2apex

Making sense of the Graph Revolution
Making sense of the Graph RevolutionMaking sense of the Graph Revolution
Making sense of the Graph Revolution
InfiniteGraph
 
Powering a Graph Data System with Scylla + JanusGraph
Powering a Graph Data System with Scylla + JanusGraphPowering a Graph Data System with Scylla + JanusGraph
Powering a Graph Data System with Scylla + JanusGraph
ScyllaDB
 
Designing Modern Streaming Data Applications
Designing Modern Streaming Data ApplicationsDesigning Modern Streaming Data Applications
Designing Modern Streaming Data Applications
Arun Kejariwal
 
Mastering MapReduce: MapReduce for Big Data Management and Analysis
Mastering MapReduce: MapReduce for Big Data Management and AnalysisMastering MapReduce: MapReduce for Big Data Management and Analysis
Mastering MapReduce: MapReduce for Big Data Management and Analysis
Teradata Aster
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics Platform
Srinath Perera
 
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit
 
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandMobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
François Garillot
 
Alerting mechanism and algorithms introduction
Alerting mechanism and algorithms introductionAlerting mechanism and algorithms introduction
Alerting mechanism and algorithms introduction
FEG
 
Presentation
PresentationPresentation
Presentation
Dimitris Stripelis
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
Jaime Martin Losa
 
Opal: Simple Web Services Wrappers for Scientific Applications
Opal: Simple Web Services Wrappers for Scientific ApplicationsOpal: Simple Web Services Wrappers for Scientific Applications
Opal: Simple Web Services Wrappers for Scientific Applications
Sriram Krishnan
 
Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...
njcar
 
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Databricks
 
WSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needsWSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needs
Sriskandarajah Suhothayan
 
An Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark MeetupAn Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark Meetup
jlacefie
 
An Introduction to Spark
An Introduction to SparkAn Introduction to Spark
An Introduction to Spark
jlacefie
 
Scientific
Scientific Scientific
Scientific
marpierc
 
Full Stack Reactive In Practice
Full Stack Reactive In PracticeFull Stack Reactive In Practice
Full Stack Reactive In Practice
Lightbend
 
Horizons doc
Horizons docHorizons doc
Horizons doc
Sanman Rajput
 
Analytics with Spark
Analytics with SparkAnalytics with Spark
Analytics with Spark
Probst Ludwine
 

Similar to Building calloutswithoutwsdl2apex (20)

Making sense of the Graph Revolution
Making sense of the Graph RevolutionMaking sense of the Graph Revolution
Making sense of the Graph Revolution
 
Powering a Graph Data System with Scylla + JanusGraph
Powering a Graph Data System with Scylla + JanusGraphPowering a Graph Data System with Scylla + JanusGraph
Powering a Graph Data System with Scylla + JanusGraph
 
Designing Modern Streaming Data Applications
Designing Modern Streaming Data ApplicationsDesigning Modern Streaming Data Applications
Designing Modern Streaming Data Applications
 
Mastering MapReduce: MapReduce for Big Data Management and Analysis
Mastering MapReduce: MapReduce for Big Data Management and AnalysisMastering MapReduce: MapReduce for Big Data Management and Analysis
Mastering MapReduce: MapReduce for Big Data Management and Analysis
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics Platform
 
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
 
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandMobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
 
Alerting mechanism and algorithms introduction
Alerting mechanism and algorithms introductionAlerting mechanism and algorithms introduction
Alerting mechanism and algorithms introduction
 
Presentation
PresentationPresentation
Presentation
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
 
Opal: Simple Web Services Wrappers for Scientific Applications
Opal: Simple Web Services Wrappers for Scientific ApplicationsOpal: Simple Web Services Wrappers for Scientific Applications
Opal: Simple Web Services Wrappers for Scientific Applications
 
Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...
 
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
Using Deep Learning on Apache Spark to Diagnose Thoracic Pathology from Chest...
 
WSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needsWSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needs
 
An Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark MeetupAn Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark Meetup
 
An Introduction to Spark
An Introduction to SparkAn Introduction to Spark
An Introduction to Spark
 
Scientific
Scientific Scientific
Scientific
 
Full Stack Reactive In Practice
Full Stack Reactive In PracticeFull Stack Reactive In Practice
Full Stack Reactive In Practice
 
Horizons doc
Horizons docHorizons doc
Horizons doc
 
Analytics with Spark
Analytics with SparkAnalytics with Spark
Analytics with Spark
 

More from Ming Yuan

Cloud and Analytics -- 2020 sparksummit
Cloud and Analytics -- 2020 sparksummitCloud and Analytics -- 2020 sparksummit
Cloud and Analytics -- 2020 sparksummit
Ming Yuan
 
Forrester2019
Forrester2019Forrester2019
Forrester2019
Ming Yuan
 
R & Python on Hadoop
R & Python on HadoopR & Python on Hadoop
R & Python on Hadoop
Ming Yuan
 
SSO with sfdc
SSO with sfdcSSO with sfdc
SSO with sfdc
Ming Yuan
 
Singleton
SingletonSingleton
Singleton
Ming Yuan
 
Rest and beyond
Rest and beyondRest and beyond
Rest and beyond
Ming Yuan
 
Simplifying Apache Cascading
Simplifying Apache CascadingSimplifying Apache Cascading
Simplifying Apache Cascading
Ming Yuan
 

More from Ming Yuan (7)

Cloud and Analytics -- 2020 sparksummit
Cloud and Analytics -- 2020 sparksummitCloud and Analytics -- 2020 sparksummit
Cloud and Analytics -- 2020 sparksummit
 
Forrester2019
Forrester2019Forrester2019
Forrester2019
 
R & Python on Hadoop
R & Python on HadoopR & Python on Hadoop
R & Python on Hadoop
 
SSO with sfdc
SSO with sfdcSSO with sfdc
SSO with sfdc
 
Singleton
SingletonSingleton
Singleton
 
Rest and beyond
Rest and beyondRest and beyond
Rest and beyond
 
Simplifying Apache Cascading
Simplifying Apache CascadingSimplifying Apache Cascading
Simplifying Apache Cascading
 

Recently uploaded

Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 

Recently uploaded (20)

Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 

Building calloutswithoutwsdl2apex

  • 1. Building Callouts without WSDL2Apex or Apex Parser Ming Yuan Solution Architect Zurich North America
  • 2. Welcome Zurich Insurance Group (Zurich) is a leading multi-line insurance provider with a global network of subsidiaries and offices in Europe, North America, Latin America, Asia-Pacific and the Middle East as well as other markets. For more information about the products and services it offers and people Zurich employs around the world, go to http://www.zurichna.com/zna/aboutzurich/zna-home.htm. In North America, Zurich (www.zurichna.com) is a leading commercial property-casualty insurance provider serving the global corporate, large corporate, middle markets, specialties and programs sectors. In addition, Zurich also offers life insurance products and services. 2012 marks Zurich’s 100 year anniversary of insuring America and the success of its customers, shareholders and employees. Further information about Zurich’s 100 year anniversary of insuring America is available at http://www.zurichna.com/100.
  • 3. Architecture Landscape • SFDC is the strategic platform to provide single-pane-of-glass user experience • Service-Oriented Architecture established enterprise-wide – SFDC exchanges data with on-premise applications via Enterprise Service Bus (ESB) EnterpriseServiceBus
  • 4. The Challenge is.. • Existing service contracts (defined in WSDLs) are based on IBM’s Industry Model for Insurance • These WSDLs uncovered some limitations of the WSDL2Apex tool – Unsupported data types – Complex namespace inheritance structure – Multiple XSD imports into a single WSDL; otherwise a consolidated WSDL may exceed size limit • Known workaround options didn’t work well – Manually trim down each WSDL to fit in WSDL2Apex – Develop custom APEX parser per service
  • 5. POC: WSDL2Apex Stub vs. Framework Results captured, with permissions to use, from http://www.villagechief.com/product/codescan
  • 6. Overview of the Framework • An abstract base class for requests – Represents all type of requests – Allows developers to inject logic to generate actual XML requests • A generic XML parser class – Parses XML stream into Map structures • A common response class – Checks the status of invocation – Manages the Maps (containing data and metadata) – Retrieves values using XPath-like keys
  • 7. Sample Request Class – Per Service Endpoint public class WeatherRequest extends EasySOARequest { private String zipCode = ‘’; public WeatherRequest() { super(); httpMethod = 'POST'; endpoint = 'http://wsf.cdyne.com/WeatherWS/Weather.asmx'; headers.put('Content-Type', 'text/xml; charset=utf-8'); timeOut = 120000; } public void setZipCode(String s) {zipcode = s;} public override String getPayload() { return getSOAPRequest(‘<GetCityForecastByZIP><ZIP>’ + zipcode + ‘</ZIP></GetCityForecastByZIP>‘); } }
  • 8. /ForecastReturn/State /ForecastReturn/City /ForecastReturn/WeatherStationCity /ForecastReturn/ForecastResult/Forecast/Date /ForecastReturn/ForecastResult/Forecast/WeatherID /ForecastReturn/ForecastResult/Forecast/Description /ForecastReturn/ForecastResult/Forecast__1/Date /ForecastReturn/ForecastResult/Forecast__1/WeatherID /ForecastReturn/ForecastResult/Forecast__1/Description Keys for data storage /ForecastReturn/State /ForecastReturn/City /ForecastReturn/WeatherStationCity /ForecastReturn/ForecastResult/Forecast/Date (/0/0/0/0) /ForecastReturn/ForecastResult/Forecast/WeatherID (/0/0/0/0) /ForecastReturn/ForecastResult/Forecast/Description (/0/0/0/0) /ForecastReturn/ForecastResult/Forecast/Date (/0/0/1/0) /ForecastReturn/ForecastResult/Forecast/WeatherID (/0/0/1/0) /ForecastReturn/ForecastResult/Forecast/Description (/0/0/1/0) Keys for data retrieval The Generic Parse – from XML to Maps <ForecastReturn> <State>IL</State> <City>Arlington Heights</City> <WeatherStationCity> Waukegan </WeatherStationCity> <ForecastResult> <Forecast> <Date> 2014-08-14T00:00:00 </Date> <WeatherID>4</WeatherID> <Description> Sunny </Description> </Forecast> <Forecast> <Date> 2014-08-15T00:00:00 </Date> <WeatherID>2</WeatherID> <Description> Partly Cloudy </Description> </Forecast> </ForecastResult> </ForecastReturn>
  • 9. The Response Class – Data Retrieval • Simple responses – response.retrieveElement(xpath) – response.retrieveElements(List<String> xpaths) • Responses with collections – response.getNumberOfSiblings(xpath) – response.getNumberOfSiblings(xpath, indexpath) – response.retrieveElement(xpath, indexpath) – response.retrieveImmediateValuesInCollection(xpath, indexpath) – response.retrieveUniqueValuesInCollection(xpath, indexpath) – response.retrieveAllValuesInCollection(xpath, indexpath) – response.retrieveValuesFromSiblings(xpath, indexpath) • Advanced methods – response.createNewSObject(String name, Map<String, String> mappings) – response.createNewSObject(String name, Map<String, String> mappings, List<String> defaults) – response.populateFields(SObject s, Map<String, String> mappings) – response.populateFields(SObject s, Map<String, String> mappings, List<String> defaults) • Backdoor method for development – response.debugAndLog()
  • 10. How the Framework Works.. 2: populateReqData 4: callout 6: isValid 8: retrieveElements
  • 11. Sample Invoker Class – Pattern-Based Development // initiate a request object WeatherRequest req = new WeatherRequest(); req.setZipCode(myAccount.zipcode); // make the callout EasySOAResponse resp = req.callout(); // check the status of a callout if (! resp.isValid()) { // handle exception; } // process data in the response myAccount.WeatherStation = resp.retrieveElement(‘/ForecastReturn/WeatherStationCity’);
  • 12. More Enriched Features • Built out one more generic parser for JSON • Support dynamically creating or populating Sobjects Map<String, String> m = EasySOAHelper.getMappingRules(‘MyMappingRules__c'); resp.createNewSObject(‘MySObject', m); Or Map<String, String> m = EasySOAHelper.getMappingRules(‘MyMappingRules__c'); MySObject obj = new MySObject(); resp.populateFields(obj, m); • Published a managed package – “Easy XML, JSON and Web Services” https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000B5DqiEAF
  • 13. Goals Achieved; Uncovered Hidden Gems! • Time saving in development phase per service • Single set of APIs for SOAP, JSON, or Restful web services • Highly configurable module supporting dynamic modifications • Leverages WS-Security headers programmatically • Significant reduction in code base • True parallel development among SFDC development team, Service modeling team, and Service implementation team
  • 14.
  • 15. Appendix: The Whole Set of Framework Classes