Previous Page | Next Page

Overview of SAS BI Web Services

Creating SAS BI Web Services


Use Web Services: Prerequisite

Before you can use Web services, you need to perform the following steps:

  1. Decide whether you want to use SAS BI Web Services for .NET or SAS BI Web Services for Java. Install SAS BI Web Services and the SAS Metadata Server.

    Note:   When you install SAS 9.2 BI Web Services, you are actually installing two Web services: the XMLA Web services that were available with SAS 9.1, and the new WebServiceMaker Web service that is used create generated Web services.  [cautionend]

  2. Write a SAS program to use as a stored process with Web services. See Writing SAS Programs for XMLA Web Services.

  3. Define a stored process server, if one is not already defined.

  4. Define a stored process by using SAS Management Console. Use XMLA Web Service as a keyword and Stream as the stored process output type when defining a stored process to be called by an XMLA Web service.


Use XMLA Web Services

On the client side, perform the following steps to use XMLA Web services:

  1. Locate the Web Service Description Language File (WSDL). You can access the WSDL for a SAS BI Web Service by appending a '?WSDL' onto the service endpoint.

  2. Write the code for the client application that uses either the Discover method or the Execute method to call the Web service.

  3. Run the code.

For XMLA Web services, the SAS code that implements the Web service, the metadata, and the client code that calls the Web service must all be synchronized. The following table shows how to synchronize these items:

Items to Synchronize
Item SAS Program Metadata Client Code
Name The name of the file that contains the SAS code. Associates the name of the SAS Stored Process with the name of the file.
<StoredProcess name=
'MyStoredProcess'>
Input Data Reads XML from the fileref.

libname instream
xml;
The name of the fileref, which must match the name of the data source.
<Stream name='instream'>
<XMLDataFromClientHere...
</Stream>
Input Parameters Macros.

&tablename
The parameter name is specified in the metadata. Parameters are treated as strings, regardless of the type that is specified in the metadata.
<Parameter
name='tablename'>
myParam</Parameter>
Output Data Writes output to the _WEBOUT fileref as XML.

libname _WEBOUT
xml xmlmeta=
&_XMLSCHEMA;
Designates the output as 'Streaming'. Uses the XML that is returned.


Use Generated Web Services

Follow these steps to use generated Web services:

  1. Generate a new Web service:

    1. Determine URL of the Web Service Maker endpoint.

    2. In SAS Management Console, select a set of stored processes and then select Actions [arrow] Deploy As Web Service to generate a new Web service that can be used to call the selected stored processes.

      In the Web Service Maker URL field of the Deploy as Web Service wizard, type the endpoint URL or select an existing URL. The user who performs this action should belong to the SAS BI Web Services Users metadata group so that the new Web service can be stored in metadata. The metadata is created only if the service is successfully deployed in the target container. The new Web service will contain one operation for each stored process that you selected.

      Upon successful deployment, a message displays that tells you the endpoint URL for the newly deployed Web service.

  2. Create clients to call the Web service.

A Web service can be created with multiple operations in it. Each operation corresponds to a stored process, and has the same name as the stored process, unless there is a naming conflict. If the name of the stored process conflicts with another name, then a new operation name is created.

Previous Page | Next Page | Top of Page