Deploying SAS Programs as Web Services How the
Deploying SAS Programs as Web Services How the power of SAS can be leveraged using Web Service Technologies Greg Ludwinski June 12, 2013
Agenda • Why expose SAS programs as Web Services? • SAS BI Web Services for Java – Evolution – Architecture – Benefits and Limitations • Demonstration 2021 -02 -20 Statistics Canada • Statistique Canada 2
Web Service Benefits • Standards based – Industry wide (W 3 C and OASIS) – Available tools/frameworks • Encapsulation – Language and platform transparency – Abstraction from underlying system – Business rules implemented in Web Service • Scalable – Modular design – Leverages XML – Part of Service Oriented Architecture 2021 -02 -20 Statistics Canada • Statistique Canada 3
SAS BI Web Services for Java • The SAS BI Platform includes a facility to expose Stored Processes as Web Services SAS BI Platform • WSDL is created automatically based on Stored Process definitions Client Middle tier • Evolution: – SAS 9. 1: XMLA Web. Metadata Services Server Services – SAS 9. 2: Generated Web – SAS 9. 3: Structured Web Services Server Data tier 2021 -02 -20 tier Statistics Canada • Statistique Canada 4
SAS Web Service Architecture 2021 -02 -20 Statistics Canada • Statistique Canada 5
Building SAS Web Services SAS BI Web Services SAS Stored Process SAS Macro Existing SAS Code 2021 -02 -20 Statistics Canada • Statistique Canada 6
Service Endpoints for SOAP Structured Web Service http: //<server>: <port>/SASBIWS/services/<metadata path>/<stored process name> Generated Web Service http: //<server>: <port>/SASBIWS/services/<generated service name> WSDL http: //<service endpoint>? wsdl 2021 -02 -20 Statistics Canada • Statistique Canada 7
Service Endpoints for REST Plain XML http: //<server>: <port>/SASBIWS/rest/stored. Processes/stored/process/<metadata path>/<stored process name> http: //<server>: <port>/SASBIWS/rest/<generated service name>/<stored process name>/parameters/<parameter name> http: //<server>: <port>/SASBIWS/rest/<generated service name>/<stored process name>/streams/<stream name> JSON (Output parameters only) http: //<server>: <port>/SASBIWS/json/stored. Processes/stored/process/<metadata path>/<stored process name> http: //<server>: <port>/SASBIWS/json/<generated service name>/<stored process name> 2021 -02 -20 Statistics Canada • Statistique Canada 8
Features • The Prompting Framework is leveraged to define input and output parameters. • Custom schemas can be create to define XML data sources and targets (streams) • Supports almost all Stored Process Features • Web Configuration Options (SSL, IP Filtering) • Metadata Security (SAS BI Web Services Group) 2021 -02 -20 Statistics Canada • Statistique Canada 9
Benefits • No SAS Components required on client machine. • Very cost effective way to create Web Services once infrastructure is setup • The Stored Processes can be invoked using other methods (Custom IOM client, Proc STP) • All the general benefits of web services 2021 -02 -20 Statistics Canada • Statistique Canada 10
Limitations • Performance overhead – Connection setup – Marshalling/Un-marshalling of messages – Must be cautious with large data files • Supported Protocols • Control over WSDL • IIS is no longer supported 2021 -02 -20 Statistics Canada • Statistique Canada 11
Demonstration 2021 -02 -20 Statistics Canada • Statistique Canada 12
Statistics Canada Statistique Canada Greg Ludwinski Project Leader - SAS Technology Centre System Engineering Division R. H. Coats Building, 14 th Floor, Section Q Ottawa, Ontario, Canada K 1 A 0 T 6 (613) 951 -2768 Fax (613) 951 -0607 Gregory. Ludwinski@statcan. gc. ca Canada 2021 -02 -20 Statistics Canada • Statistique Canada 13
- Slides: 13