02-22-2017 07:25 AM
I am currently facing issues while trying to invoke SAS BIWebservice.
I am using Firefox plugin- RESTClient to invoke
https://<webserverUrl>/SASBIWS/rest/storedProcesses/<StoredProcess Path >/<stpName>?<parameter1>=<value1>
However, "parameter1" is not getting resolved in sas.
I had registered the stored process with
* Results capability- enabled for "Stream" and "Package"
* Server Type: Stored process only
* Prompts: <parameter1> type: text
The purpose of this stored process is to stream a PDF file to the browser.
Any help on this topic would be highly appreciated:
1. I am currently puzzled why the parameter is not getting resolved.
2. How do I access the WADL file for this webservice
WSDL path is as follows:
https://<webserverUrl>/SASBIWS/services/<StoredProcess Path >/<stpName>.wsdl
Please let me know if there are any questions.
Thanks in advance,
02-23-2017 06:10 AM
I managed to pass the parameter as Body in the RESTClient and it worked:
But, now it fails in SAS as I had given fileref as _WEBOUT in the code- SAS tries to write _webout.dat in the SAS Foundation library where it doesnt have write access.
MPRINT(FSTREAM): data _null_;
MPRINT(FSTREAM): infile ".../saswork/SAS_work470C0026F545_sla06469/SAS_work8ECA0026F545_sla06469/temp.csv" recfm=f lrecl=1;
MPRINT(FSTREAM): file _WEBOUT recfm=n;
MPRINT(FSTREAM): input c $char1. @@;
MPRINT(FSTREAM): put c $char1. @@;
Now, I am wondering if I have to define "Data Targets" for this stored process.
03-02-2017 09:06 AM
Thanks Vince for the response- I did mention the Stream option. In the meantime, I fixed my issues.
Just in case, it helps anyone - I am listing down the mistakes/ corrections I made during the last couple of days:
1. After getting annoyed with _WEBOUT, I decided to use another fileref in my SAS code and registered that in Data target tab while creating the stored process (Once I find some time, I will recheck _WEBOUT again- conceptually it should work- i guess!)
2. I spent some hours to realise that the endpoint URl is different for getting the Streamed results/ Output parameters
3. In dataTargets, it took me some time to configure the correct content-type for associated file
4. At client side, I gave content-type: text/xml as I pass the parameters
There are still lot of areas to explore in this topic. Eventhough, I read about XMLA webservice, i havent still understood its use case. Since RESTClient is easy to use, I felt RESTful webservices comparatively simple to operate.