<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAS Code to Obtain Responses from REST web service in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197474#M49343</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if it could work out .&lt;/P&gt;&lt;P&gt;1) check proc http&lt;/P&gt;&lt;P&gt;2) check&amp;nbsp; DS2 package of HTTP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Aug 2015 13:42:37 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2015-08-12T13:42:37Z</dc:date>
    <item>
      <title>SAS Code to Obtain Responses from REST web service</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197473#M49342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to call REST web services from SAS. I have written below code to call it using some papers. I aim to get session_id however it gives me following log and cannot get session id. Can you help me to call it successfully? It is okay to put result into SAS dataset so that I can use session_id for other requests. Also added REST request used in SOAPUI. Thanks!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-----------------------------BEGIN REQUEST CODE----------------------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*** FILENAME and URL will call REST; &lt;/P&gt;&lt;P&gt;%let user=sasdemo;&lt;/P&gt;&lt;P&gt;%let password=SASpwd1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;filename price url '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://kkbcsd00:8080/SASWIPClientAccess/rest/sessions?userid=&amp;amp;user.&amp;amp;password=&amp;amp;password"&gt;http://kkbcsd00:8080/SASWIPClientAccess/rest/sessions?userid=&amp;amp;user.&amp;amp;password=&amp;amp;password&lt;/A&gt;&lt;SPAN&gt;.' debug; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;data price; &lt;/P&gt;&lt;P&gt;&amp;nbsp; infile price length=len; &lt;/P&gt;&lt;P&gt;&amp;nbsp; input record $varying200. len; &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;-----------------------------END REQUEST CODE----------------------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;---------------------------LOG---------------------------------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; GET /SASWIPClientAccess/rest/sessions?userid=sasdemo&amp;amp;password=SASpwd1 HTTP/1.0&lt;/P&gt;&lt;P&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Host: kkbcsd00:8080&lt;/P&gt;&lt;P&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept: */*.&lt;/P&gt;&lt;P&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept-Language: en&lt;/P&gt;&lt;P&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept-Charset: iso-8859-1,*,utf-8&lt;/P&gt;&lt;P&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; User-Agent: SAS/URL&lt;/P&gt;&lt;P&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; &lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; HTTP/1.1 405 Method Not Allowed&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Server: Apache-Coyote/1.1&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Set-Cookie: JSESSIONID.SASServer1=59EA70C2F4EA3D813AD13A41079DAB95; Path=/&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Allow: POST&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Type: text/html;charset=utf-8&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Length: 1098&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Date: Wed, 12 Aug 2015 13:32:28 GMT&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Connection: close&lt;/P&gt;&lt;P&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; &lt;/P&gt;&lt;P&gt;ERROR: Invalid reply received from the HTTP server. Use the debug option for more info.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.PRICE may be incomplete.&amp;nbsp; When this step was stopped there were 0 observations and 1 variables.&lt;/P&gt;&lt;P&gt;WARNING: Data set WORK.PRICE was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;---------------------REQUEST FROM SOAPUI-----------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;credentials&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;userid&amp;gt;sasdemo&amp;lt;/userid&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;password&amp;gt;SASpwd1&amp;lt;/password&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/credentials&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 13:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197473#M49342</guid>
      <dc:creator>ozgegroove</dc:creator>
      <dc:date>2015-08-12T13:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code to Obtain Responses from REST web service</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197474#M49343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if it could work out .&lt;/P&gt;&lt;P&gt;1) check proc http&lt;/P&gt;&lt;P&gt;2) check&amp;nbsp; DS2 package of HTTP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 13:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197474#M49343</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-08-12T13:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code to Obtain Responses from REST web service</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197475#M49344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried with proc http, however it did not work as well. but i didn't understand what you mean by your second advice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197475#M49344</guid>
      <dc:creator>ozgegroove</dc:creator>
      <dc:date>2015-08-13T07:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code to Obtain Responses from REST web service</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197476#M49345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OH, There is a&amp;nbsp; PROC DS2&amp;nbsp; . It is added from SAS9.4 . And In it there is a http package also can do PROC HTTP work.&lt;/P&gt;&lt;P&gt;Chack its documentation.Not sure if it could work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197476#M49345</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-08-13T07:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code to Obtain Responses from REST web service</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197477#M49346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xia, the environment is SAS9.3 unfortunately &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea about the error I get in the code? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 07:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-to-Obtain-Responses-from-REST-web-service/m-p/197477#M49346</guid>
      <dc:creator>ozgegroove</dc:creator>
      <dc:date>2015-08-14T07:37:15Z</dc:date>
    </item>
  </channel>
</rss>

