This example illustrates how to create a simple stored process and execute it as a RESTful SAS BI web service.
Example: XML Input and XML Output
In this example, XML input is sent to the stored process, and XML output is sent back to the client application.
More Information
For more information, see the following:
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
filename input TEMP;
data _null_;
file input;
input rec $80.;
put rec;
/* NOTE: All input lines below must begin in column 1. */
cards4;
<upload_stream>
<streams>
<instream>
<Value>
<Table>
<InData >
<Column1>1</Column1>
<Column2>20</Column2>
<Column3>99</Column3>
</InData>
<InData>
<Column1>50</Column1>
<Column2>200</Column2>
<Column3>9999</Column3>
</InData>
<InData>
<Column1>100</Column1>
<Column2>2000</Column2>
<Column3>1000000</Column3>
</InData>
</Table>
</Value>
</instream>
</streams>
</upload_stream>
;;;;
/* NOTE: You must specify the path for your output XML file on the next line. */
filename resp "c:\temp\test.xml";
/* NOTE: You must provide the values for the host name and port as well as the correct path */
/* to the web_service_test5 stored process. */
proc http
url="http://host-name:port/SASBIWS/rest/storedProcesses/Examples/web_service_test5"
in=input
out=resp;
headers "Content-Type"="application/xml" "Accept"="application/xml";
run;
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Type: | Sample |
Date Modified: | 2019-01-14 14:56:57 |
Date Created: | 2018-12-18 15:36:51 |
Product Family | Product | Host | Product Release | SAS Release | ||
Starting | Ending | Starting | Ending | |||
SAS System | SAS Integration Technologies | Microsoft® Windows® for x64 | 9.4_M5 | 9.4 TS1M5 | ||
Microsoft Windows 8 Enterprise 32-bit | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows 8 Enterprise x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows 8 Pro 32-bit | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows 8 Pro x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows 8.1 Enterprise x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows 8.1 Pro 32-bit | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows 8.1 Pro x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows 10 | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2008 | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2008 R2 | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2008 for x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2012 Datacenter | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2012 R2 Std | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2012 Std | 9.4_M5 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2016 | 9.4_M5 | 9.4 TS1M5 | ||||
Windows 7 Enterprise 32 bit | 9.4_M5 | 9.4 TS1M5 | ||||
Windows 7 Enterprise x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Windows 7 Home Premium 32 bit | 9.4_M5 | 9.4 TS1M5 | ||||
Windows 7 Home Premium x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Windows 7 Professional 32 bit | 9.4_M5 | 9.4 TS1M5 | ||||
Windows 7 Professional x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Windows 7 Ultimate 32 bit | 9.4_M5 | 9.4 TS1M5 | ||||
Windows 7 Ultimate x64 | 9.4_M5 | 9.4 TS1M5 | ||||
64-bit Enabled AIX | 9.4_M5 | 9.4 TS1M5 | ||||
64-bit Enabled Solaris | 9.4_M5 | 9.4 TS1M5 | ||||
HP-UX IPF | 9.4_M5 | 9.4 TS1M5 | ||||
Linux for x64 | 9.4_M5 | 9.4 TS1M5 | ||||
Solaris for x64 | 9.4_M5 | 9.4 TS1M5 |