Reputation: 1
I need your help on how to create a stored process to output data stream (xml) and deploy it as web service? SAS stored process need to stream outout a dataset as xml.
But when I test it on soap UI as a webservice no value was displayed on xml.
Kindly see the code below and the output from SOAP UI. I also attached the screenshots of the properties of the stored process.enter code here
CODE:
data chartxml; input price sell; datalines; 20 250 30 180 40 130 50 250 60 250 ; run; libname _webout XML XMLmeta=schemadata; data _webout.chartxml; set chartxml; run;
SOAP OUTPUT
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <soapenv:Body <n:chartResponse xmlns:n="http://tempuri.org/Chart"> <n:chartResult/ </n:chartResponse> </soapenv:Body> </soapenv:Envelope>
Thanks, Krishna
Upvotes: 0
Views: 473
Reputation: 12691
I wasn't able to run your example, but can advise that you are mixing up the (automatically available) _webout
fileref by using it as a (manually defined) libref.
If you want to stream web output, you can do so by using it in a file
statement, as follows:
data _null_;
file _webout;
put '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"' @;
put '<soapenv:Body <n:chartResponse xmlns:n="http://tempuri.org/Chart">' @;
put '<n:chartResult/ </n:chartResponse> </soapenv:Body> </soapenv:Envelope>';
run;
To 'deploy as a web service' your SAS code needs to be registered as a Stored Process (using SAS Management Console) with streaming output selected. You can then execute the STP by using a URL with the metadata location of the STP in the _PROGRAM parameter - like so:
http://YOURMACHINE:8080/SASStoredProcess/do?_PROGRAM=/MetaLoc/STP_Name
Upvotes: 1