Posts

Showing posts from July, 2011

WCF and PROC SOAP

Image
Adam Bullock in SAS Tech Support has become a superstar in my book. I don't send him tickets directly but the area I am working in always seems to find him.

The latest issue was consuming a WCF service. This was different since Microsoft uses interfaces in WCF vs the old way of doing it. I didn't catch that but Adam did. Here is working SAS code for handling it:



FILENAME REQUEST 'C:\temp\REQUEST.xml'; FILENAME RESPONSE 'C:\temp\RESPONSE.xml'; data _null_; file request; input; put _infile_; datalines4; <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"> <soapenv:Header/> <soapenv:Body> <tem:DoWork> <!--Optional:--> <tem:p>Test</tem:p> </tem:DoWork> </soapenv:Body> </soapenv:Envelope> ;;;; run; %let RESPONSE=RESPONSE; proc soap in=REQUEST out=&RESPONSE url="http://prognos2.savia…