The SAS Web Service Roadmap

Download Report

Transcript The SAS Web Service Roadmap

Copyright © 2005, SAS Institute Inc. All rights reserved.

Integrating SAS® in a Web Services Architecture

Dan Jahn Developer – SAS Cary

Web Services Driving the Pendulum

Power on the Server

Back-end servers

Mid-Tier servers Power on the Desktop

Smart Client Copyright © 2005, SAS Institute Inc. All rights reserved.

Agenda

   Introduce Stored Processes When to Use Web Services Technical roadmap for developing Web Services with SAS

Copyright © 2005, SAS Institute Inc. All rights reserved.

Stored Process

 SAS Code • Runs on SAS Stored Process Server  Metadata • Stored in SAS Metadata Server

Copyright © 2005, SAS Institute Inc. All rights reserved.

Desktop SAS + SASMC Enterprise Guide ETL Studio SAS Stored Processes SAS Metadata Server Web Report Studio Stored Process Web App Custom Java/.Net code SAS Stored Process Server SAS BI Web Services

Copyright © 2005, SAS Institute Inc. All rights reserved.

When to use Web Services

 Interoperability • Java and .Net clients • Servers, desktops, devices • Based on Standards!!!

  Not for lots of Data SOA!?!

• SAS makes it easy to use SOA without Web Services

Copyright © 2005, SAS Institute Inc. All rights reserved.

SOA

Copyright © 2005, SAS Institute Inc. All rights reserved.

4 Tenets of Service Oriented Architecture

    Boundaries are Explicit Services are Autonomous Services share Schema and Contract, not Class Compatibility is based upon Policy

Copyright © 2005, SAS Institute Inc. All rights reserved.

Attachments

    Inline WS-Attachments == DIME SwA == Soap with Attachments == WS-I MTOM == SOAP Message Transmission Optimization Mechanism==W3C

Copyright © 2005, SAS Institute Inc. All rights reserved.

SAS Web Service Roadmap

Three Implementation Phases: 1.

2.

3.

Write a custom Web Service – SAS v7 SAS BI Web Services Version 1 – SAS 9.1

SAS BI Web Services Version 2 – SAS 9.2

Copyright © 2005, SAS Institute Inc. All rights reserved.

Phase 1: Custom Web Service

    Highly customizable You write the code for the Web Service Custom level of Platform integration Samples available in .Net and Java

Copyright © 2005, SAS Institute Inc. All rights reserved.

Custom Web Service SOAP Custom Web Service IOM Client Application SAS Workspace Server

Copyright © 2005, SAS Institute Inc. All rights reserved.

IOM

  Integrated Object Model Originally Workspace Server; now OLAP, Metadata, and StoredProcess Servers

Copyright © 2005, SAS Institute Inc. All rights reserved.

Custom Web Service in .Net

  ObjectManager – makes connections to SAS Workspace Server has OLE/DB interfaces for use with ADO

obServer.MachineDNSName = “localhost”; obServer.Port = 5307; iWorkspace = obObjectFactory.CreateObjectByServer(“”, true, obServer, “userName”, “password”, xmlInfo); … iSP.Execute("GetCreditLimit", "custname" + "=" + custName + " custid=" + custID + " outData=work.out"); Copyright © 2005, SAS Institute Inc. All rights reserved.

Custom Web Service in Java

  SAS Foundation Services Workspace Server has JDBC interfaces

serverInfo.put("host", "localhost"); serverInfo.put("port", "5307"); serverInfo.put("userName", "username"); serverInfo.put("password", "password"); IWorkspace iWorkspace = wsf.createWorkspaceByServer(serverInfo); … iSP.Execute("GetCreditLimit", "custname" + "=" + custName + " custid=" + custID + " outData=work.out"); Copyright © 2005, SAS Institute Inc. All rights reserved.

Workspace or StoredProcess Server?

   You can use either for your custom Web Service Data interfaces with Workspace only Workspace server designed for long-held connections (Enterprise Guide).  StoredProcessServer designed for quick, web transactions.

Copyright © 2005, SAS Institute Inc. All rights reserved.

Phase 2: SAS BI Web Services SAS9.1

 Uses StoredProcesses that run on a StoredProcessServer   XMLA Generic WSDL – Execute and Discover StoredProcesses must generate XML with XML Libname Engine

Copyright © 2005, SAS Institute Inc. All rights reserved.

SAS BI Web Services Client Application SOAP SAS BI Web Services IOM SAS Metadata Server IOM SAS Stored Process Server

Copyright © 2005, SAS Institute Inc. All rights reserved.

Create A Stored Process

   Install: Decide on Java or .Net on Web Server Write the SAS Program Use SAS Management Console to define metadata

Copyright © 2005, SAS Institute Inc. All rights reserved.

Write the SAS Program

    Inputs: Macros and filerefs containing XML • Parameter  Macro • Stream  Fileref (containing XML) Output: _WEBOUT fileref containing XML XML Libname Engine Errors: SYSCC and SYSMSG

Copyright © 2005, SAS Institute Inc. All rights reserved.

Example SAS Code

libname instream xml; libname _WEBOUT xml xmlmeta=&_XMLSCHEMA;

proc means

data = instream.

&tablename; output out =_WEBOUT.mean;

run

;

Copyright © 2005, SAS Institute Inc. All rights reserved.

Define Metadata

 1.

2.

3.

SAS Management Console Define a Server Define a User Define a StoredProcess

Copyright © 2005, SAS Institute Inc. All rights reserved.

SAS Code libname _WEBOUT xml xmlmeta=&_XMLSCHEMA; Client Code (Excel VBA) Set nodeList = ws.wsm_Execute(...

Copyright © 2005, SAS Institute Inc. All rights reserved.

SAS Code libname instream xml; Client Code (Excel VBA) "

4
“ Copyright © 2005, SAS Institute Inc. All rights reserved.

SAS Code proc means

data = instream.

&tablename;

Client Code (Excel VBA) myData Copyright © 2005, SAS Institute Inc. All rights reserved.

Make it Easier to Use

 SAS BI Web Services Wizard • Visual Studio .Net add-in • Generates C# and VB code  SAS BI Web Services Explorer • ASP.Net Web Application • Explore available StoredProcesses • Create WSDL files

Copyright © 2005, SAS Institute Inc. All rights reserved.

Phase 2: Call a Web Service From SAS

 Use Mid-Tier as controller and communicate with SAS through IOM

Copyright © 2005, SAS Institute Inc. All rights reserved.

Phase 3: SAS BI Web Services v2

   Detailed WSDL Attachments – MTOM ODS or XML Libname Engine

Copyright © 2005, SAS Institute Inc. All rights reserved.

Phase 3: Defining Metadata

Using SAS Management Console:   Define the Stored Process Select a set of Stored Processes to Define the Web Service  No special Keywords (XMLA Web Service)

Copyright © 2005, SAS Institute Inc. All rights reserved.

Phase 3: Call a Web Service From SAS

   proc soap; Use XML libname engine to read/create XML May choose to use XSL

Copyright © 2005, SAS Institute Inc. All rights reserved.

Other Presentations

 Tuesday 2:30 Room 107 Processes” – DelGobbo/Wolfe – “Using Parameters to Create Intelligent Stored  Tuesday 3:30 Room 107 - White/Wolfe SAS Enterprise Guide” – “Stored Process Creation, Testing and Maintenance via

Copyright © 2005, SAS Institute Inc. All rights reserved.

Samples and Documentation

 http://support.sas.com/rnd/itech • ‘Samples’ Link • ‘Library’ Link

Copyright © 2005, SAS Institute Inc. All rights reserved.

Contact Me

  [email protected]

Demo Area: • Today: 5pm-7pm • Tuesday: 11:45am-5pm • Wednesday: 8:30-10am

Copyright © 2005, SAS Institute Inc. All rights reserved.

34

Copyright © 2005, SAS Institute Inc. All rights reserved.

Copyright © 2005, SAS Institute Inc. All rights reserved.

Copyright © 2005, SAS Institute Inc. All rights reserved.

Copyright © 2005, SAS Institute Inc. All rights reserved.