SlideShare a Scribd company logo
1
PharmaSUG 2015 – Paper PO08
Exchange of data over internet using web services (e.g., SOAP and
REST) in SAS environment
Kevin Lee, Accenture Accelerated Research & Development Services, Berwyn, PA
ABSTRACT
We are living in the world of abundant information, and the ability to seamlessly exchange information between
customers, partners and internal business units is vital for success for any organization. Today, much of the
information can be accessed and exchanged between different systems over the internet using web services. Web
services allow different systems to exchange data over internet. The paper will show how SAS® can exchange the
data with the different software system over internet using web services.
The paper will introduce the basic concepts of web service and its method of communication: SOAP(Simple Object
Access protocol) and REST(Representational state transfer). First, the paper will briefly describe SOAP and its
structure – HTTP header and SOAP envelop. The paper will show the examples of how SAS programmers send a
request to the web service and receive the response from the web service using SOAP in SAS environment. The
paper will also show how SAS programmers can create a SOAP request using SOAPUI, the open-source software
which allows the users to create SOAP and test the connectivity with the web service. The paper will explain how
FILENAME and SOAPWEB function send SOAP request file and receive response file. The paper will also explain
the structure of SOAP response file in XML.
The paper will show the structure of REST, and it will instruct how SAS programmers write SAS codes to get the data
from other system using REST. The paper will introduce SAS FILEMANE, its url and debug options.
INTRODUCTION OF WEB SERVICE
A web service is a method of communication that allows two software systems to exchange the data over the internet.
Two primary architectures for web services are SOAP and REST.
INTRODUCTION OF SOAP
Simple Object Access protocol (SOAP) is a protocol specification for data exchange in web services. It is platform,
system and language independent and communicates through the internet. It uses XML format and Hypertext
Transfer Protocol (HTTP). It sends request files in XML and receives response file in XML. Since HTTP is
supported by all internet browsers and servers, SOAP provides a way to communicate between applications running
on different systems, technologies and languages.
It has three elements.
1. An envelope element that identifies the XML document as a SOAP message.
2. A header element that contains header information.
3. A body element that contains call and response information.
INTRODUCTION OF REST
Representational state transfer (REST) is a simpler data exchange format than SOAP data exchange. It is also
platform, system and language independent and communicates through the internet. It also uses HTTP, but unlike
SOAP, response files come ready to be used, not wrapped in SOAP envelope. So, REST does not need to use XML
format to send and receive data through web services. In the examples of REST response files, programmers will
see how request and response files from REST can be different from those of SOAP.
CASE STUDY 1 – GETTING THE LIST OF CITIES
HOW TO CREATE SOAP USING SOAPUI
SOAPUI is the free software package that helps the programmers to develop SOAP request. The programmers can
use SOAPUI to test SOAP API, create SOAP request file and receive SOAP response file.
In order to create SOAP request file, programmers open SOAPUI software and go to “File” and create “New SOAP
Project” as shown in Display 1.
2
Display 1: Open new SOAP project in SOAPUI.
Programmers can add WDSL to get the necessary information on web services as shown in Display 2. Web
Service Description Language (WSDL) is an XML-based interface definition language that is used for describing the
functionality offered by a web service of system.
Display 2: provide WSDL to new SOAP project in SOAPUI.
As shwon in Display 3, programmers see that new project of “WeatherForecastService” is created along with
GetCitiesByCountry and GetForecastByCity objects.
3
Display 3: WeatherForecastService SOAP project in SOAPUI.
Once “Request 1” object is clicked as highlighted in Display 3, programmers will have a window of “Request 1”. This
is SOAP request for GetCitiesByCountry command. “?” red-highlighted in Display 4 is a parameter input on this
SOAP request file.
Display 4: Request window of WeatherForecastService SOAP project in SOAPUI.
4
After adding “USA” as shown in Display 5 and clicking on the green process button as shown in Display 5, the
programmers will receive SOAP response files shown in Display 6.
Display 5: Add the parameter to SOAP request of WeatherForecastService SOAP project in SOAPUI.
The programmers will receive SOAP response file as yellow-highlighted in Display 6.
Display 6: Receive SOAP response from web service in SOAPUI.
SAS programmers will be also able to send SOAP request file and receive SOAP response file.
HOW TO USE SOAP IN SAS
SAS programmers can send SOAP request file that is created in SOAPUI. The first part of Code 1 is obtained from
RAW tab in SOAPUI and is HTTP. The second part is obtained from XML tab in SOAPUI and is a SOAP request.
POST http://www.restfulwebservices.net/wcf/WeatherForecastService.svc HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "GetCitiesByCountry"
Content-Length: 357
Host: www.restfulwebservices.net
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.restfulwebservices.net/ServiceContracts/2008/01">
<soapenv:Header/>
5
<soapenv:Body>
<ns:GetCitiesByCountry>
<!--Optional:-->
<ns:Country>USA</ns:Country>
</ns:GetCitiesByCountry>
</soapenv:Body>
</soapenv:Envelope>
Code 1: Full SOAP request of WeatherForecastService SOAP project in SOAPUI.
Upon Full SOAP request shown in Code 1, SAS programmers can create SAS codes shown in Code 2 and save
REQUEST XML files shown in Code 3.
********************************************************************************
* Send saved SOAP request file and receive SOAP response file.
********************************************************************************;
FILENAME request 'T:KLRequest.xml' ;
FILENAME response 'T:KLResponse.xml';
DATA _NULL_;
** URL is from SOAP Header in POST;
url="http://www.restfulwebservices.net/wcf/WeatherForecastService.svc";
** SOAPACTION is from SOAP Header in POST;
SOAPACTION='GetCitiesByCountry';
rc=SOAPWEB("request",url,"response",soapaction,,,,,,,);
RUN;
Code 2: SAS codes for SOAP request.
SAS programmers save SOAP request xml file shown in Code 3 in local drive ('T:KLRequest.xml'), send SOAP
request file to web service in URL of "http://www.restfulwebservices.net/wcf/WeatherForecastService.svc" as a call of
'GetCitiesByCountry'. In Code 2, SOAPWEB function will contain all the necessary information:
 Request: SOAP request xml file
 URL: address of web service
 Response: SOAP response xml file
 Soapaction: call method
SOAPWEB function sends SOAP request xml files to URL address of web service of different system through the
internet, calls the method of GetCitiesByCountry to the system and gets SOAP response file. SAS programmers also
put the parameter values in request.xml; for example, SAS programmers can write the codes to put parameter values
in <Country> tag in Code 3.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.restfulwebservices.net/ServiceContracts/2008/01">
<soapenv:Header/>
<soapenv:Body>
<ns:GetCitiesByCountry>
<!--Optional:-->
<ns:Country>USA</ns:Country>
</ns:GetCitiesByCountry>
</soapenv:Body>
</soapenv:Envelope>
Code 3: REQUEST.xml
The successful run of SOAPWEB can receive a response file in Code 4. In Code 4, SAS programmers receive the
list of cities. SAS programmers now can convert xml files to SAS datasets for further analysis or transformation.
<?xml version="1.0"?>
-<GetCitiesByCountryResponse xmlns="http://www.restfulwebservices.net/ServiceContracts/2008/01">
-<GetCitiesByCountryResult xmlns:a=http://schemas.microsoft.com/2003/10/Serialization/Arrays
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:string>ABILENE</a:string>
<a:string>ALBUQUERQUE</a:string>
<a:string>NANTUCKET</a:string>
<a:string>WACO</a:string>
……
<a:string>SOUTH HAWAII MET</a:string>
<a:string>HICKAM</a:string>
6
<a:string>HONOLULU ARTCC</a:string>
<a:string>OLIKTOK POINT</a:string>
<a:string>POINT LAY</a:string>
</GetCitiesByCountryResult>
</GetCitiesByCountryResponse>
Code 4: RESPONSE.xml
The successful run of SOAPWEB can receive a response file in Code 4. In Code 4, the programmers receive the
list of cities.
The SAS programmer can use SAS XML mapper to map xml file to SAS datasets. In SAS 9.3, SAS programmers
create XMLMap file using XMLV2 LIBNAME engine. XMLMap file can create SAS datasets from a hierarchical XML
file. The Code 5 will show how SAS programmers can create XMLMap file.
********************************************************************************
* Create XMLMap file and create SAS datasets from XML file
********************************************************************************;
** SOAP response xml files;
filename myresp "T:KLResponse.xml";
**** Create response xml map file;
filename respmap " T:KLresponse.map";
libname myresp xmlv2 xmlmap=respmap automap=replace;
**** Convert SOAP response xml files to SAS temporary dataset in work area;
proc copy in=myresp out=work;
run;
Code 5: SAS codes that can create XMLMap file and also convert XML file to SAS datasets using XMLMap file.
In SAS working library, SAS dataset of “String” is created, and it has variables and contents as indicated in Table 1.
GetCitiesByCountryResult_ORDINAL String_ORDINAL string
1 1 ABILENE
1 2 ALBUQUERQUE
1 3 NANTUCKET
1 4 WACO
….
Table 1: SAS dataset of String
HIGH LEVEL DESIGN
Figure 1 shows the high level design between SAS and external system over internet using SOAP. It shows how
SAS programmers can build the integration of SAS and external system using SOAP. A SOAP request was sent to
web service of external system by SAS. SAS will receive SOAP response file in XML and convert XML to SAS
dataset for analysis and reporting.
7
External
System
SOAP
SAS Environment
SOAP
request.xml
SOAP
response.xml
SAS
datasets
Secured
Internet
(HTTPS)
Conversion from
XML to SAS
Figure 1. High Level Design of integration of SAS and external system over internet using SOAP
CASE STUDY 2 – GETTING THE CURRENTY CONVERSION RATE
If adding WSDL of http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl in SOAPUI, the
programmers can create SOAP request file. In Figure 13, the programmer added USD in <FromCurrency> tag and
EUR in <ToCurrency> tag in request.xml. Once the request file was sent to web service through SOAPUI, the
programmer received 0.7334 as Rate.
Display 7: Request.xml and its response.xml in SOAPUI
The SAS programmers can create SAS codes shown in Code 6 that send “currency request.xml” in Code 7 to obtain
the currency rate of “currency response.xml” in Code 8.
*** Request2 - this works;
FILENAME request 'T:KLwebservicecurrency request.xml' ;
FILENAME response 'T:KLwebservicecurrency response.xml';
8
DATA _NULL_;
url="http://www.restfulwebservices.net/wcf/CurrencyService.svc";
SOAPACTION='GetConversionRate';
rc=SOAPWEB("request",url,"response",soapaction,,,,,,,);
RUN;
Code 6: SAS codes for currency exchange.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.restfulwebservices.net/ServiceContracts/2008/01">
<soapenv:Header/>
<soapenv:Body>
<ns:GetConversionRate>
<!--Optional:-->
<ns:FromCurrency>USD</ns:FromCurrency>
<!--Optional:-->
<ns:ToCurrency>EUR</ns:ToCurrency>
</ns:GetConversionRate>
</soapenv:Body>
</soapenv:Envelope>
Code 7: currency request.xml
<GetConversionRateResponse xmlns="http://www.restfulwebservices.net/ServiceContracts/2008/01">
<GetConversionRateResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:a="http://www.restfulwebservices.net/DataContracts/2008/01">
<a:FromCurrency>USD</a:FromCurrency>
<a:ToCurrency>EUR</a:ToCurrency>
<a:Rate>0.7394</a:Rate>
</GetConversionRateResult>
</GetConversionRateResponse>
Code 8: currency response.xml
The SAS programmers can convert currency response xml file to SAS datasets as shown in Code 5.
HOW TO OBTAIN DATA USING REST
Unlike SOAP-based web service, REST does not require request xml file to receive the data from web service.
REST simply sends request through HTTP with parameters in it.
In Code 9, SAS programmers will call yahoo finance REST web service to receive the data of apple stock price from
11/29/2004 to 01/01/2005. SAS statement FILENAME and its option URL can set up REST communication. The
URL up to ?( http://ichart.finance.yahoo.com/table.csv)is the path to web service and URL after ?
(s=AAPL&a=11&b=29&c=2004&d=01&e=1&f=2005&g=d&ignore=.csv) is parameters and their inputs to web
service. The URL will call daily quotes of apple stocks from 11-29-2004 to 01-01-2005 and SAS dataset of price can
contain its information.
*** FILENAME and URL will call REST;
filename price url
'http://ichart.finance.yahoo.com/table.csv?s=AAPL&a=11&b=29&c=2004&d=01&e=1&f=2005&g=d
&ignore=.csv' debug;
*** SAS dataset of price will contain daily stock quotes of Apple stock;
data price;
infile price length=len;
input record $varying200. len;
run;
Code 9: SAS codes for REST
SAS programmers can also use PROC HTTP to receive Apple daily quotes in CSV file format. SAS codes in Code
10 will show how to call REST using PROC HTTP and save CSV response files to local drive.
*** Create csv file in local drive ;
filename out "&local_url.resp-stock-appl.csv"; ** will get response output;
*** URL option in PROC HTTP send a GET request to Yahoo Finance REST;
proc http
out=out
9
url="http://ichart.finance.yahoo.com/table.csv?s=AAPL&a=11&b=29&c=2004&d=01&e=1&f=
2005&g=d&ignore=.csv"
method="GET";
run;
Code 10: SAS codes for REST
Code 11 shows how SAS programmers can also receive CDASH Control Terminology from NCI website.
*** Codes will receive CDASH CT from NCI URL to local drive;
filename cdash "G:KLweb connectionURL connectionCDASH Terminology.xls";
**** This gives the exact same results;
proc http out=cdash
url="http://evs.nci.nih.gov/ftp1/CDISC/SDTM/CDASH%20Terminology.xls"
method="get"
;
run;
Code 11: SAS codes to receive CDASH Control Terminology
CONCLUSION
The ability to exchange data and information using web services over the internet will be extremely useful and
powerful. SAS introduces web services related SAS functions, statements and options such as SOAPWEB,
FILENAME URL, PROC HTTP, PROC SOAP and LIBNAME XMLV2. Using SAS web service codes, SAS
programmers are able to receive real-time data over internet into SAS environment for reporting and analysis. SAS
programmers can also build data and system integration over the internet.
REFERENCES
 The SAS programmer’s guide to XML and Web Services, Chirstopher W. Schacherer.
 The Ins and Outs of Web-Based Data with SAS, Bill McNeill
 A simple way of importing from A REST Web Service into SAS in Three Lines of Code, Philip Busby
 Extreme Web Access: What to do when FILENAME URL is not enough, Garth Helf.
 Using Base SAS to talk to the outside world: consuming SOAP and REST Web Services using SAS 9.1 and
the new features of SAS 9.2, Curtis E. Mack.
 SAS XML LIBNAME Engine: User’s guide
 SAS PROC HTTP: User’s guide
 SAS SOAPWEB FUNCTION: User’s guide
 SOAPUI User’s guide
 World Wide Web Consortium. SOAP Version 1.2
CONTACT INFORMATION
Your comments and questions are valued and welcomed. Please contact the author at
Kevin Lee
Accenture Life Sciences
Kevin.s.lee@accenture.com
610-407-1767
TRADEMARKS
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS
Institute Inc. in the USA and other countries.
® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their
respective companies.

More Related Content

What's hot

The Chimera Grid Concept and Application
The Chimera Grid Concept and Application The Chimera Grid Concept and Application
The Chimera Grid Concept and Application
Putika Ashfar Khoiri
 
Different types of tankers
Different types of tankersDifferent types of tankers
Different types of tankers
Ruranha
 
Presentation on dgr
Presentation on dgr Presentation on dgr
Presentation on dgr
Professional Aviation Services
 
Parts of reciprocating engine
Parts of reciprocating engineParts of reciprocating engine
Parts of reciprocating engine
rampal singh
 
Cabin Interior And Ice and Rain System
Cabin Interior And Ice and Rain SystemCabin Interior And Ice and Rain System
Cabin Interior And Ice and Rain System
Bai Haqi
 
M.V. ALVA STAR
M.V. ALVA STARM.V. ALVA STAR
M.V. ALVA STAR
Juan Gonzalez Hernandez
 
Fan airofoil
Fan airofoilFan airofoil
Fan airofoil
Rajesh Kumar
 
Kaushik Airport Manager Roles and Responsibilities
Kaushik  Airport Manager Roles and ResponsibilitiesKaushik  Airport Manager Roles and Responsibilities
Kaushik Airport Manager Roles and Responsibilities
Kaushik Deb
 
Proposed RWY21 RESA at YIA
Proposed RWY21 RESA at YIAProposed RWY21 RESA at YIA
Proposed RWY21 RESA at YIA
Kozarni Koko
 
MC-CATALOGUE 100616
MC-CATALOGUE 100616MC-CATALOGUE 100616
MC-CATALOGUE 100616
Rhesa Lessey
 
Transport 120517032132-phpapp01
Transport 120517032132-phpapp01Transport 120517032132-phpapp01
Transport 120517032132-phpapp01
meeraspillai
 
Esterline advanced sensors overview (short version) january 2015
Esterline advanced sensors  overview (short version) january 2015Esterline advanced sensors  overview (short version) january 2015
Esterline advanced sensors overview (short version) january 2015
EsterlineAdvancedSensors
 
Air Freedom Rights
Air Freedom RightsAir Freedom Rights
Air Freedom Rights
Andrew Gower
 
Hull inspection
Hull inspectionHull inspection
Hull inspection
HIMTFaculty
 
Annex 14 ppt cheng
Annex 14 ppt chengAnnex 14 ppt cheng
Annex 14 ppt cheng
guestb793fe2
 
Lecture 1 Aircraft Classification.ppt
Lecture 1 Aircraft Classification.pptLecture 1 Aircraft Classification.ppt
Lecture 1 Aircraft Classification.ppt
imran698542
 
A flight plan in 10 steps
A flight plan in 10 stepsA flight plan in 10 steps
A flight plan in 10 steps
Superior Labs Inc
 
Runway orientation
Runway orientationRunway orientation
Runway orientation
rehan5c
 
Instrument approach procedures GSR 751 E provision & PANS OPS ops
Instrument approach procedures GSR 751 E provision & PANS OPS  opsInstrument approach procedures GSR 751 E provision & PANS OPS  ops
Instrument approach procedures GSR 751 E provision & PANS OPS ops
ARVIND KUMAR SINGH
 
Barcos
BarcosBarcos
Barcos
Ivan98Mc
 

What's hot (20)

The Chimera Grid Concept and Application
The Chimera Grid Concept and Application The Chimera Grid Concept and Application
The Chimera Grid Concept and Application
 
Different types of tankers
Different types of tankersDifferent types of tankers
Different types of tankers
 
Presentation on dgr
Presentation on dgr Presentation on dgr
Presentation on dgr
 
Parts of reciprocating engine
Parts of reciprocating engineParts of reciprocating engine
Parts of reciprocating engine
 
Cabin Interior And Ice and Rain System
Cabin Interior And Ice and Rain SystemCabin Interior And Ice and Rain System
Cabin Interior And Ice and Rain System
 
M.V. ALVA STAR
M.V. ALVA STARM.V. ALVA STAR
M.V. ALVA STAR
 
Fan airofoil
Fan airofoilFan airofoil
Fan airofoil
 
Kaushik Airport Manager Roles and Responsibilities
Kaushik  Airport Manager Roles and ResponsibilitiesKaushik  Airport Manager Roles and Responsibilities
Kaushik Airport Manager Roles and Responsibilities
 
Proposed RWY21 RESA at YIA
Proposed RWY21 RESA at YIAProposed RWY21 RESA at YIA
Proposed RWY21 RESA at YIA
 
MC-CATALOGUE 100616
MC-CATALOGUE 100616MC-CATALOGUE 100616
MC-CATALOGUE 100616
 
Transport 120517032132-phpapp01
Transport 120517032132-phpapp01Transport 120517032132-phpapp01
Transport 120517032132-phpapp01
 
Esterline advanced sensors overview (short version) january 2015
Esterline advanced sensors  overview (short version) january 2015Esterline advanced sensors  overview (short version) january 2015
Esterline advanced sensors overview (short version) january 2015
 
Air Freedom Rights
Air Freedom RightsAir Freedom Rights
Air Freedom Rights
 
Hull inspection
Hull inspectionHull inspection
Hull inspection
 
Annex 14 ppt cheng
Annex 14 ppt chengAnnex 14 ppt cheng
Annex 14 ppt cheng
 
Lecture 1 Aircraft Classification.ppt
Lecture 1 Aircraft Classification.pptLecture 1 Aircraft Classification.ppt
Lecture 1 Aircraft Classification.ppt
 
A flight plan in 10 steps
A flight plan in 10 stepsA flight plan in 10 steps
A flight plan in 10 steps
 
Runway orientation
Runway orientationRunway orientation
Runway orientation
 
Instrument approach procedures GSR 751 E provision & PANS OPS ops
Instrument approach procedures GSR 751 E provision & PANS OPS  opsInstrument approach procedures GSR 751 E provision & PANS OPS  ops
Instrument approach procedures GSR 751 E provision & PANS OPS ops
 
Barcos
BarcosBarcos
Barcos
 

Similar to Exchange of data over internet using web service(e.g., soap and rest) in SAS environment

Web Programming
Web ProgrammingWeb Programming
Web Programming
VijayapriyaP1
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
pasam suresh
 
web programming
web programmingweb programming
web programming
shreeuva
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
Neil Ghosh
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGig
Mandakini Kumari
 
Xml web services
Xml web servicesXml web services
Xml web services
Raghu nath
 
Introduction to soapui and webservices
Introduction to soapui  and webservicesIntroduction to soapui  and webservices
Introduction to soapui and webservices
Anil Yadav
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
Masud Rahman
 
Session 8 Android Web Services - Part 1.pdf
Session 8 Android Web Services - Part 1.pdfSession 8 Android Web Services - Part 1.pdf
Session 8 Android Web Services - Part 1.pdf
EngmohammedAlzared
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Jackson F. de A. Mafra
 
Web programming
Web programmingWeb programming
Web programming
sowfi
 
Web Services
Web ServicesWeb Services
Web Services
F K
 
53 hui homework2
53 hui homework253 hui homework2
53 hui homework2
huis89
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
Mindfire Solutions
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
Er. Prashant Veer Singh
 
WebServices Basic Introduction
WebServices Basic IntroductionWebServices Basic Introduction
WebServices Basic Introduction
Shahid Shaik
 
Rest web service
Rest web serviceRest web service
Rest web service
Hamid Ghorbani
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
stephenbhadran
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
NamanVerma88
 
Java Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPJava Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAP
IMC Institute
 

Similar to Exchange of data over internet using web service(e.g., soap and rest) in SAS environment (20)

Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 
web programming
web programmingweb programming
web programming
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGig
 
Xml web services
Xml web servicesXml web services
Xml web services
 
Introduction to soapui and webservices
Introduction to soapui  and webservicesIntroduction to soapui  and webservices
Introduction to soapui and webservices
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
 
Session 8 Android Web Services - Part 1.pdf
Session 8 Android Web Services - Part 1.pdfSession 8 Android Web Services - Part 1.pdf
Session 8 Android Web Services - Part 1.pdf
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015
 
Web programming
Web programmingWeb programming
Web programming
 
Web Services
Web ServicesWeb Services
Web Services
 
53 hui homework2
53 hui homework253 hui homework2
53 hui homework2
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
WebServices Basic Introduction
WebServices Basic IntroductionWebServices Basic Introduction
WebServices Basic Introduction
 
Rest web service
Rest web serviceRest web service
Rest web service
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
 
Java Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPJava Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAP
 

More from Kevin Lee

Patient’s Journey using Real World Data and its Advanced Analytics
Patient’s Journey using Real World Data and its Advanced AnalyticsPatient’s Journey using Real World Data and its Advanced Analytics
Patient’s Journey using Real World Data and its Advanced Analytics
Kevin Lee
 
Introduction of AWS Cloud Computing and its future for Biometric Department
Introduction of AWS Cloud Computing and its future for Biometric DepartmentIntroduction of AWS Cloud Computing and its future for Biometric Department
Introduction of AWS Cloud Computing and its future for Biometric Department
Kevin Lee
 
A fear of missing out and a fear of messing up : A Strategic Roadmap for Chat...
A fear of missing out and a fear of messing up : A Strategic Roadmap for Chat...A fear of missing out and a fear of messing up : A Strategic Roadmap for Chat...
A fear of missing out and a fear of messing up : A Strategic Roadmap for Chat...
Kevin Lee
 
Prompt it, not Google it - Prompt Engineering for Data Scientists
Prompt it, not Google it - Prompt Engineering for Data ScientistsPrompt it, not Google it - Prompt Engineering for Data Scientists
Prompt it, not Google it - Prompt Engineering for Data Scientists
Kevin Lee
 
Leading into the Unknown? Yes, we need Change Management Leadership
Leading into the Unknown? Yes, we need Change Management LeadershipLeading into the Unknown? Yes, we need Change Management Leadership
Leading into the Unknown? Yes, we need Change Management Leadership
Kevin Lee
 
How to create SDTM DM.xpt using Python v1.1
How to create SDTM DM.xpt using Python v1.1How to create SDTM DM.xpt using Python v1.1
How to create SDTM DM.xpt using Python v1.1
Kevin Lee
 
Enterprise-level Transition from SAS to Open-source Programming for the whole...
Enterprise-level Transition from SAS to Open-source Programming for the whole...Enterprise-level Transition from SAS to Open-source Programming for the whole...
Enterprise-level Transition from SAS to Open-source Programming for the whole...
Kevin Lee
 
How I became ML Engineer
How I became ML Engineer How I became ML Engineer
How I became ML Engineer
Kevin Lee
 
Artificial Intelligence in Pharmaceutical Industry
Artificial Intelligence in Pharmaceutical IndustryArtificial Intelligence in Pharmaceutical Industry
Artificial Intelligence in Pharmaceutical Industry
Kevin Lee
 
Tell stories with jupyter notebook
Tell stories with jupyter notebookTell stories with jupyter notebook
Tell stories with jupyter notebook
Kevin Lee
 
Perfect partnership - machine learning and CDISC standard data
Perfect partnership - machine learning and CDISC standard dataPerfect partnership - machine learning and CDISC standard data
Perfect partnership - machine learning and CDISC standard data
Kevin Lee
 
Machine Learning : why we should know and how it works
Machine Learning : why we should know and how it worksMachine Learning : why we should know and how it works
Machine Learning : why we should know and how it works
Kevin Lee
 
Big data for SAS programmers
Big data for SAS programmersBig data for SAS programmers
Big data for SAS programmers
Kevin Lee
 
Big data in pharmaceutical industry
Big data in pharmaceutical industryBig data in pharmaceutical industry
Big data in pharmaceutical industry
Kevin Lee
 
How FDA will reject non compliant electronic submission
How FDA will reject non compliant electronic submissionHow FDA will reject non compliant electronic submission
How FDA will reject non compliant electronic submission
Kevin Lee
 
End to end standards driven oncology study (solid tumor, Immunotherapy, Leuke...
End to end standards driven oncology study (solid tumor, Immunotherapy, Leuke...End to end standards driven oncology study (solid tumor, Immunotherapy, Leuke...
End to end standards driven oncology study (solid tumor, Immunotherapy, Leuke...
Kevin Lee
 
Are you ready for Dec 17, 2016 - CDISC compliant data?
Are you ready for Dec 17, 2016 - CDISC compliant data?Are you ready for Dec 17, 2016 - CDISC compliant data?
Are you ready for Dec 17, 2016 - CDISC compliant data?
Kevin Lee
 
SAS integration with NoSQL data
SAS integration with NoSQL dataSAS integration with NoSQL data
SAS integration with NoSQL data
Kevin Lee
 
Introduction of semantic technology for SAS programmers
Introduction of semantic technology for SAS programmersIntroduction of semantic technology for SAS programmers
Introduction of semantic technology for SAS programmers
Kevin Lee
 
Standards Metadata Management (system)
Standards Metadata Management (system)Standards Metadata Management (system)
Standards Metadata Management (system)
Kevin Lee
 

More from Kevin Lee (20)

Patient’s Journey using Real World Data and its Advanced Analytics
Patient’s Journey using Real World Data and its Advanced AnalyticsPatient’s Journey using Real World Data and its Advanced Analytics
Patient’s Journey using Real World Data and its Advanced Analytics
 
Introduction of AWS Cloud Computing and its future for Biometric Department
Introduction of AWS Cloud Computing and its future for Biometric DepartmentIntroduction of AWS Cloud Computing and its future for Biometric Department
Introduction of AWS Cloud Computing and its future for Biometric Department
 
A fear of missing out and a fear of messing up : A Strategic Roadmap for Chat...
A fear of missing out and a fear of messing up : A Strategic Roadmap for Chat...A fear of missing out and a fear of messing up : A Strategic Roadmap for Chat...
A fear of missing out and a fear of messing up : A Strategic Roadmap for Chat...
 
Prompt it, not Google it - Prompt Engineering for Data Scientists
Prompt it, not Google it - Prompt Engineering for Data ScientistsPrompt it, not Google it - Prompt Engineering for Data Scientists
Prompt it, not Google it - Prompt Engineering for Data Scientists
 
Leading into the Unknown? Yes, we need Change Management Leadership
Leading into the Unknown? Yes, we need Change Management LeadershipLeading into the Unknown? Yes, we need Change Management Leadership
Leading into the Unknown? Yes, we need Change Management Leadership
 
How to create SDTM DM.xpt using Python v1.1
How to create SDTM DM.xpt using Python v1.1How to create SDTM DM.xpt using Python v1.1
How to create SDTM DM.xpt using Python v1.1
 
Enterprise-level Transition from SAS to Open-source Programming for the whole...
Enterprise-level Transition from SAS to Open-source Programming for the whole...Enterprise-level Transition from SAS to Open-source Programming for the whole...
Enterprise-level Transition from SAS to Open-source Programming for the whole...
 
How I became ML Engineer
How I became ML Engineer How I became ML Engineer
How I became ML Engineer
 
Artificial Intelligence in Pharmaceutical Industry
Artificial Intelligence in Pharmaceutical IndustryArtificial Intelligence in Pharmaceutical Industry
Artificial Intelligence in Pharmaceutical Industry
 
Tell stories with jupyter notebook
Tell stories with jupyter notebookTell stories with jupyter notebook
Tell stories with jupyter notebook
 
Perfect partnership - machine learning and CDISC standard data
Perfect partnership - machine learning and CDISC standard dataPerfect partnership - machine learning and CDISC standard data
Perfect partnership - machine learning and CDISC standard data
 
Machine Learning : why we should know and how it works
Machine Learning : why we should know and how it worksMachine Learning : why we should know and how it works
Machine Learning : why we should know and how it works
 
Big data for SAS programmers
Big data for SAS programmersBig data for SAS programmers
Big data for SAS programmers
 
Big data in pharmaceutical industry
Big data in pharmaceutical industryBig data in pharmaceutical industry
Big data in pharmaceutical industry
 
How FDA will reject non compliant electronic submission
How FDA will reject non compliant electronic submissionHow FDA will reject non compliant electronic submission
How FDA will reject non compliant electronic submission
 
End to end standards driven oncology study (solid tumor, Immunotherapy, Leuke...
End to end standards driven oncology study (solid tumor, Immunotherapy, Leuke...End to end standards driven oncology study (solid tumor, Immunotherapy, Leuke...
End to end standards driven oncology study (solid tumor, Immunotherapy, Leuke...
 
Are you ready for Dec 17, 2016 - CDISC compliant data?
Are you ready for Dec 17, 2016 - CDISC compliant data?Are you ready for Dec 17, 2016 - CDISC compliant data?
Are you ready for Dec 17, 2016 - CDISC compliant data?
 
SAS integration with NoSQL data
SAS integration with NoSQL dataSAS integration with NoSQL data
SAS integration with NoSQL data
 
Introduction of semantic technology for SAS programmers
Introduction of semantic technology for SAS programmersIntroduction of semantic technology for SAS programmers
Introduction of semantic technology for SAS programmers
 
Standards Metadata Management (system)
Standards Metadata Management (system)Standards Metadata Management (system)
Standards Metadata Management (system)
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
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
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
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.
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 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...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
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
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 

Exchange of data over internet using web service(e.g., soap and rest) in SAS environment

  • 1. 1 PharmaSUG 2015 – Paper PO08 Exchange of data over internet using web services (e.g., SOAP and REST) in SAS environment Kevin Lee, Accenture Accelerated Research & Development Services, Berwyn, PA ABSTRACT We are living in the world of abundant information, and the ability to seamlessly exchange information between customers, partners and internal business units is vital for success for any organization. Today, much of the information can be accessed and exchanged between different systems over the internet using web services. Web services allow different systems to exchange data over internet. The paper will show how SAS® can exchange the data with the different software system over internet using web services. The paper will introduce the basic concepts of web service and its method of communication: SOAP(Simple Object Access protocol) and REST(Representational state transfer). First, the paper will briefly describe SOAP and its structure – HTTP header and SOAP envelop. The paper will show the examples of how SAS programmers send a request to the web service and receive the response from the web service using SOAP in SAS environment. The paper will also show how SAS programmers can create a SOAP request using SOAPUI, the open-source software which allows the users to create SOAP and test the connectivity with the web service. The paper will explain how FILENAME and SOAPWEB function send SOAP request file and receive response file. The paper will also explain the structure of SOAP response file in XML. The paper will show the structure of REST, and it will instruct how SAS programmers write SAS codes to get the data from other system using REST. The paper will introduce SAS FILEMANE, its url and debug options. INTRODUCTION OF WEB SERVICE A web service is a method of communication that allows two software systems to exchange the data over the internet. Two primary architectures for web services are SOAP and REST. INTRODUCTION OF SOAP Simple Object Access protocol (SOAP) is a protocol specification for data exchange in web services. It is platform, system and language independent and communicates through the internet. It uses XML format and Hypertext Transfer Protocol (HTTP). It sends request files in XML and receives response file in XML. Since HTTP is supported by all internet browsers and servers, SOAP provides a way to communicate between applications running on different systems, technologies and languages. It has three elements. 1. An envelope element that identifies the XML document as a SOAP message. 2. A header element that contains header information. 3. A body element that contains call and response information. INTRODUCTION OF REST Representational state transfer (REST) is a simpler data exchange format than SOAP data exchange. It is also platform, system and language independent and communicates through the internet. It also uses HTTP, but unlike SOAP, response files come ready to be used, not wrapped in SOAP envelope. So, REST does not need to use XML format to send and receive data through web services. In the examples of REST response files, programmers will see how request and response files from REST can be different from those of SOAP. CASE STUDY 1 – GETTING THE LIST OF CITIES HOW TO CREATE SOAP USING SOAPUI SOAPUI is the free software package that helps the programmers to develop SOAP request. The programmers can use SOAPUI to test SOAP API, create SOAP request file and receive SOAP response file. In order to create SOAP request file, programmers open SOAPUI software and go to “File” and create “New SOAP Project” as shown in Display 1.
  • 2. 2 Display 1: Open new SOAP project in SOAPUI. Programmers can add WDSL to get the necessary information on web services as shown in Display 2. Web Service Description Language (WSDL) is an XML-based interface definition language that is used for describing the functionality offered by a web service of system. Display 2: provide WSDL to new SOAP project in SOAPUI. As shwon in Display 3, programmers see that new project of “WeatherForecastService” is created along with GetCitiesByCountry and GetForecastByCity objects.
  • 3. 3 Display 3: WeatherForecastService SOAP project in SOAPUI. Once “Request 1” object is clicked as highlighted in Display 3, programmers will have a window of “Request 1”. This is SOAP request for GetCitiesByCountry command. “?” red-highlighted in Display 4 is a parameter input on this SOAP request file. Display 4: Request window of WeatherForecastService SOAP project in SOAPUI.
  • 4. 4 After adding “USA” as shown in Display 5 and clicking on the green process button as shown in Display 5, the programmers will receive SOAP response files shown in Display 6. Display 5: Add the parameter to SOAP request of WeatherForecastService SOAP project in SOAPUI. The programmers will receive SOAP response file as yellow-highlighted in Display 6. Display 6: Receive SOAP response from web service in SOAPUI. SAS programmers will be also able to send SOAP request file and receive SOAP response file. HOW TO USE SOAP IN SAS SAS programmers can send SOAP request file that is created in SOAPUI. The first part of Code 1 is obtained from RAW tab in SOAPUI and is HTTP. The second part is obtained from XML tab in SOAPUI and is a SOAP request. POST http://www.restfulwebservices.net/wcf/WeatherForecastService.svc HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: "GetCitiesByCountry" Content-Length: 357 Host: www.restfulwebservices.net Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.restfulwebservices.net/ServiceContracts/2008/01"> <soapenv:Header/>
  • 5. 5 <soapenv:Body> <ns:GetCitiesByCountry> <!--Optional:--> <ns:Country>USA</ns:Country> </ns:GetCitiesByCountry> </soapenv:Body> </soapenv:Envelope> Code 1: Full SOAP request of WeatherForecastService SOAP project in SOAPUI. Upon Full SOAP request shown in Code 1, SAS programmers can create SAS codes shown in Code 2 and save REQUEST XML files shown in Code 3. ******************************************************************************** * Send saved SOAP request file and receive SOAP response file. ********************************************************************************; FILENAME request 'T:KLRequest.xml' ; FILENAME response 'T:KLResponse.xml'; DATA _NULL_; ** URL is from SOAP Header in POST; url="http://www.restfulwebservices.net/wcf/WeatherForecastService.svc"; ** SOAPACTION is from SOAP Header in POST; SOAPACTION='GetCitiesByCountry'; rc=SOAPWEB("request",url,"response",soapaction,,,,,,,); RUN; Code 2: SAS codes for SOAP request. SAS programmers save SOAP request xml file shown in Code 3 in local drive ('T:KLRequest.xml'), send SOAP request file to web service in URL of "http://www.restfulwebservices.net/wcf/WeatherForecastService.svc" as a call of 'GetCitiesByCountry'. In Code 2, SOAPWEB function will contain all the necessary information:  Request: SOAP request xml file  URL: address of web service  Response: SOAP response xml file  Soapaction: call method SOAPWEB function sends SOAP request xml files to URL address of web service of different system through the internet, calls the method of GetCitiesByCountry to the system and gets SOAP response file. SAS programmers also put the parameter values in request.xml; for example, SAS programmers can write the codes to put parameter values in <Country> tag in Code 3. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.restfulwebservices.net/ServiceContracts/2008/01"> <soapenv:Header/> <soapenv:Body> <ns:GetCitiesByCountry> <!--Optional:--> <ns:Country>USA</ns:Country> </ns:GetCitiesByCountry> </soapenv:Body> </soapenv:Envelope> Code 3: REQUEST.xml The successful run of SOAPWEB can receive a response file in Code 4. In Code 4, SAS programmers receive the list of cities. SAS programmers now can convert xml files to SAS datasets for further analysis or transformation. <?xml version="1.0"?> -<GetCitiesByCountryResponse xmlns="http://www.restfulwebservices.net/ServiceContracts/2008/01"> -<GetCitiesByCountryResult xmlns:a=http://schemas.microsoft.com/2003/10/Serialization/Arrays xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:string>ABILENE</a:string> <a:string>ALBUQUERQUE</a:string> <a:string>NANTUCKET</a:string> <a:string>WACO</a:string> …… <a:string>SOUTH HAWAII MET</a:string> <a:string>HICKAM</a:string>
  • 6. 6 <a:string>HONOLULU ARTCC</a:string> <a:string>OLIKTOK POINT</a:string> <a:string>POINT LAY</a:string> </GetCitiesByCountryResult> </GetCitiesByCountryResponse> Code 4: RESPONSE.xml The successful run of SOAPWEB can receive a response file in Code 4. In Code 4, the programmers receive the list of cities. The SAS programmer can use SAS XML mapper to map xml file to SAS datasets. In SAS 9.3, SAS programmers create XMLMap file using XMLV2 LIBNAME engine. XMLMap file can create SAS datasets from a hierarchical XML file. The Code 5 will show how SAS programmers can create XMLMap file. ******************************************************************************** * Create XMLMap file and create SAS datasets from XML file ********************************************************************************; ** SOAP response xml files; filename myresp "T:KLResponse.xml"; **** Create response xml map file; filename respmap " T:KLresponse.map"; libname myresp xmlv2 xmlmap=respmap automap=replace; **** Convert SOAP response xml files to SAS temporary dataset in work area; proc copy in=myresp out=work; run; Code 5: SAS codes that can create XMLMap file and also convert XML file to SAS datasets using XMLMap file. In SAS working library, SAS dataset of “String” is created, and it has variables and contents as indicated in Table 1. GetCitiesByCountryResult_ORDINAL String_ORDINAL string 1 1 ABILENE 1 2 ALBUQUERQUE 1 3 NANTUCKET 1 4 WACO …. Table 1: SAS dataset of String HIGH LEVEL DESIGN Figure 1 shows the high level design between SAS and external system over internet using SOAP. It shows how SAS programmers can build the integration of SAS and external system using SOAP. A SOAP request was sent to web service of external system by SAS. SAS will receive SOAP response file in XML and convert XML to SAS dataset for analysis and reporting.
  • 7. 7 External System SOAP SAS Environment SOAP request.xml SOAP response.xml SAS datasets Secured Internet (HTTPS) Conversion from XML to SAS Figure 1. High Level Design of integration of SAS and external system over internet using SOAP CASE STUDY 2 – GETTING THE CURRENTY CONVERSION RATE If adding WSDL of http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl in SOAPUI, the programmers can create SOAP request file. In Figure 13, the programmer added USD in <FromCurrency> tag and EUR in <ToCurrency> tag in request.xml. Once the request file was sent to web service through SOAPUI, the programmer received 0.7334 as Rate. Display 7: Request.xml and its response.xml in SOAPUI The SAS programmers can create SAS codes shown in Code 6 that send “currency request.xml” in Code 7 to obtain the currency rate of “currency response.xml” in Code 8. *** Request2 - this works; FILENAME request 'T:KLwebservicecurrency request.xml' ; FILENAME response 'T:KLwebservicecurrency response.xml';
  • 8. 8 DATA _NULL_; url="http://www.restfulwebservices.net/wcf/CurrencyService.svc"; SOAPACTION='GetConversionRate'; rc=SOAPWEB("request",url,"response",soapaction,,,,,,,); RUN; Code 6: SAS codes for currency exchange. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.restfulwebservices.net/ServiceContracts/2008/01"> <soapenv:Header/> <soapenv:Body> <ns:GetConversionRate> <!--Optional:--> <ns:FromCurrency>USD</ns:FromCurrency> <!--Optional:--> <ns:ToCurrency>EUR</ns:ToCurrency> </ns:GetConversionRate> </soapenv:Body> </soapenv:Envelope> Code 7: currency request.xml <GetConversionRateResponse xmlns="http://www.restfulwebservices.net/ServiceContracts/2008/01"> <GetConversionRateResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:a="http://www.restfulwebservices.net/DataContracts/2008/01"> <a:FromCurrency>USD</a:FromCurrency> <a:ToCurrency>EUR</a:ToCurrency> <a:Rate>0.7394</a:Rate> </GetConversionRateResult> </GetConversionRateResponse> Code 8: currency response.xml The SAS programmers can convert currency response xml file to SAS datasets as shown in Code 5. HOW TO OBTAIN DATA USING REST Unlike SOAP-based web service, REST does not require request xml file to receive the data from web service. REST simply sends request through HTTP with parameters in it. In Code 9, SAS programmers will call yahoo finance REST web service to receive the data of apple stock price from 11/29/2004 to 01/01/2005. SAS statement FILENAME and its option URL can set up REST communication. The URL up to ?( http://ichart.finance.yahoo.com/table.csv)is the path to web service and URL after ? (s=AAPL&a=11&b=29&c=2004&d=01&e=1&f=2005&g=d&ignore=.csv) is parameters and their inputs to web service. The URL will call daily quotes of apple stocks from 11-29-2004 to 01-01-2005 and SAS dataset of price can contain its information. *** FILENAME and URL will call REST; filename price url 'http://ichart.finance.yahoo.com/table.csv?s=AAPL&a=11&b=29&c=2004&d=01&e=1&f=2005&g=d &ignore=.csv' debug; *** SAS dataset of price will contain daily stock quotes of Apple stock; data price; infile price length=len; input record $varying200. len; run; Code 9: SAS codes for REST SAS programmers can also use PROC HTTP to receive Apple daily quotes in CSV file format. SAS codes in Code 10 will show how to call REST using PROC HTTP and save CSV response files to local drive. *** Create csv file in local drive ; filename out "&local_url.resp-stock-appl.csv"; ** will get response output; *** URL option in PROC HTTP send a GET request to Yahoo Finance REST; proc http out=out
  • 9. 9 url="http://ichart.finance.yahoo.com/table.csv?s=AAPL&a=11&b=29&c=2004&d=01&e=1&f= 2005&g=d&ignore=.csv" method="GET"; run; Code 10: SAS codes for REST Code 11 shows how SAS programmers can also receive CDASH Control Terminology from NCI website. *** Codes will receive CDASH CT from NCI URL to local drive; filename cdash "G:KLweb connectionURL connectionCDASH Terminology.xls"; **** This gives the exact same results; proc http out=cdash url="http://evs.nci.nih.gov/ftp1/CDISC/SDTM/CDASH%20Terminology.xls" method="get" ; run; Code 11: SAS codes to receive CDASH Control Terminology CONCLUSION The ability to exchange data and information using web services over the internet will be extremely useful and powerful. SAS introduces web services related SAS functions, statements and options such as SOAPWEB, FILENAME URL, PROC HTTP, PROC SOAP and LIBNAME XMLV2. Using SAS web service codes, SAS programmers are able to receive real-time data over internet into SAS environment for reporting and analysis. SAS programmers can also build data and system integration over the internet. REFERENCES  The SAS programmer’s guide to XML and Web Services, Chirstopher W. Schacherer.  The Ins and Outs of Web-Based Data with SAS, Bill McNeill  A simple way of importing from A REST Web Service into SAS in Three Lines of Code, Philip Busby  Extreme Web Access: What to do when FILENAME URL is not enough, Garth Helf.  Using Base SAS to talk to the outside world: consuming SOAP and REST Web Services using SAS 9.1 and the new features of SAS 9.2, Curtis E. Mack.  SAS XML LIBNAME Engine: User’s guide  SAS PROC HTTP: User’s guide  SAS SOAPWEB FUNCTION: User’s guide  SOAPUI User’s guide  World Wide Web Consortium. SOAP Version 1.2 CONTACT INFORMATION Your comments and questions are valued and welcomed. Please contact the author at Kevin Lee Accenture Life Sciences Kevin.s.lee@accenture.com 610-407-1767 TRADEMARKS SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies.