I am trying to run the example on page 19 of the SAS BI Web Services Developer's Guide . I followed the instructions verbatim, but could not get the saved process (automatically a web service) to return the correct result when I make a mail request. I am trying to use SOAP and XML. The error is that the instream data source was never found.
I ask someone to reproduce the example and provide accurate XML and / or SOAP with a send request (in the form of a curl).
Here is SOAP (straight from the manual)
<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="/WebServicesExamples/sampMeans"> <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>
I am sending via curl. Here is my curl command
curl -H "Content-Type: text/xml" -X POST https://mycompany.com:port/SASBIWS/services/WebServicesExamples/sampMeans --data "@sampmeanssoap.xml"
But it causes an error
The exception type "Client" that occurred during the execution of "WebServicesExamples / sampMeans Service". Exception: The expected stream "instream" is not specified.
XML creates a similar response
<StoredProcess name="/WebServicesExamples/sampMeans"> <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>
With curl
curl -H "Content-Type: text/xml" -X POST https://mycompany.com:port/SASBIWS/rest/storedProcesses/WebServicesExamples/sampMeans --data-binary "@sampmeanssoap.xml"
I can successfully terminate stored processes using only parameters, but I cannot send data sources for any reason.
source share