support.sas.com
.
stpwsmea.sas
.
This program is installed with SAS Integration Technologies. On Windows,
the default location is <SASHOME>\SASFoundation\9.4\inttech\sample
.
On UNIX, the default location is <SASHOME>/SASFoundation/9.4/samples/inttech
.
%put &tablename libname _WEBOUT xml xmlmeta = &_XMLSCHEMA; libname instream xml; proc means data=instream.&tablename output out=_WEBOUT.mean; run; libname _WEBOUT clear; libname instream clear;
/Products/SAS Intelligence
Platform/Samples
folder. If you do not have the sample
metadata, you can define the metadata for the stored process on your
SAS Metadata Server by performing the following steps.
Field
|
Value
|
---|---|
Name
|
Sample: MEANS Procedure
Web Service
|
Keywords
|
XMLA Web Service
|
Field
|
Value
|
---|---|
Application server
|
SASApp
|
Server type
|
Stored process server
only
|
Source code location
and execution
|
Allow execution on selected
application server only
Store source code on
application server
|
Source code repository
|
<SASHOME>\SASFoundation\9.4\samples\inttech
|
Source code file
|
stpwsmea.sas
|
Results
|
Stream
|
Field
|
Value
|
---|---|
Name
|
tablename
|
Displayed text
|
tablename
|
Field
|
Value
|
---|---|
Prompt type
|
Text
|
Method for populating
prompt
|
User-entered value
|
Number of values
|
Single value
|
Text type
|
Single line
|
Default value
|
InData
|
Field
|
Value
|
---|---|
Type
|
XML Data Source
|
Label
|
instream
|
Fileref
|
instream
|
Expected content type
|
text/xml
|
instream
.
Execute()
command. The SOAP request
body, or client code, follows:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sas="urn:schemas-microsoft-com:xml-analysis"> <soapenv:Header/> <soapenv:Body> <sas:Execute> <sas:Command> <StoredProcess name="/Products/SAS Intelligence Platform/Samples/ Sample: MEANS Procedure Web Service"> <Parameter name="tablename">InData</Parameter> <Stream name="instream"> <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> </Stream> </StoredProcess> </sas:Command> <sas:Properties> <PropertyList> <DataSourceInfo>Provider=SASSPS;</DataSourceInfo> </PropertyList> </sas:Properties> </sas:Execute> </soapenv:Body> </soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <n:ExecuteResponse xmlns:n="urn:schemas-microsoft-com:xml-analysis"> <n:return> <TABLE> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="TABLE"> <xs:complexType> <xs:sequence> <xs:element ref="MEAN" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="MEAN"> <xs:complexType> <xs:sequence> <xs:element name="_TYPE_" minOccurs="0" type="xs:double"/> <xs:element name="_FREQ_" minOccurs="0" type="xs:double"/> <xs:element name="_STAT_" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="8"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="COLUMN3" minOccurs="0" type="xs:double"/> <xs:element name="COLUMN2" minOccurs="0" type="xs:double"/> <xs:element name="COLUMN1" minOccurs="0" type="xs:double"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> <MEAN> <_TYPE_>0</_TYPE_> <_FREQ_>3</_FREQ_> <_STAT_>N</_STAT_> <COLUMN3>3</COLUMN3> <COLUMN2>3</COLUMN2> <COLUMN1>3</COLUMN1> </MEAN> <MEAN> <_TYPE_>0</_TYPE_> <_FREQ_>3</_FREQ_> <_STAT_>MIN</_STAT_> <COLUMN3>99</COLUMN3> <COLUMN2>20</COLUMN2> <COLUMN1>1</COLUMN1> </MEAN> <MEAN> <_TYPE_>0</_TYPE_> <_FREQ_>3</_FREQ_> <_STAT_>MAX</_STAT_> <COLUMN3>1000000</COLUMN3> <COLUMN2>2000</COLUMN2> <COLUMN1>100</COLUMN1> </MEAN> <MEAN> <_TYPE_>0</_TYPE_> <_FREQ_>3</_FREQ_> <_STAT_>MEAN</_STAT_> <COLUMN3>336699.333</COLUMN3> <COLUMN2>740</COLUMN2> <COLUMN1>50.3333333</COLUMN1> </MEAN> <MEAN> <_TYPE_>0</_TYPE_> <_FREQ_>3</_FREQ_> <_STAT_>STD</_STAT_> <COLUMN3>574456.555</COLUMN3> <COLUMN2>1094.89726</COLUMN2> <COLUMN1>49.5008417</COLUMN1> </MEAN> </TABLE> </n:return> </n:ExecuteResponse> </soapenv:Body> </soapenv:Envelope>