<?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: Call SOAP WEB Service with DS2 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655511#M196651</link>
    <description>&lt;P&gt;Thank's for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried both of but i'm still having the same error :&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Failed to determine character set from request content type. Defaulting to UTF-8 for encoding the request body.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Error reported by DS2 package d2http:&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Invalid character set '"utf-8"'.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Note from DS2 package d2http:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Failed to determine character set from response content type (text/xml; charset="utf-8"). Defaulting to UTF-8 for decoding&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;the response body.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Execution succeeded. No rows affected.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 09 Jun 2020 13:12:47 GMT</pubDate>
    <dc:creator>zinabenammar</dc:creator>
    <dc:date>2020-06-09T13:12:47Z</dc:date>
    <item>
      <title>Call SOAP WEB Service with DS2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655477#M196639</link>
      <description>&lt;P&gt;I have a problem to invoke the web service shared by SAS using DS2.&lt;/P&gt;&lt;P&gt;Please note that proc soap working fine for me.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc ds2;

data _null_;
method run();
/* instantiate the package */
declare package http h();
declare varchar(1024) body ;
declare int rc;

DECLARE varchar(10000) content;

content=
'&amp;lt;soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soap="http://www.SoapClient.com/xml/SoapResponder.xsd"&amp;gt;
&amp;lt;soapenv:Header/&amp;gt;
&amp;lt;soapenv:Body&amp;gt;
&amp;lt;soap:Method1 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&amp;gt;
&amp;lt;bstrParam1 xsi:type="xsd:string"&amp;gt;apple&amp;lt;/bstrParam1&amp;gt;
&amp;lt;bstrParam2 xsi:type="xsd:string"&amp;gt;zebra3&amp;lt;/bstrParam2&amp;gt;
&amp;lt;/soap:Method1&amp;gt;
&amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;
;;;;' ;

/* create a GET */
h.createPostMethod('http://soapclient.com/xml/soapresponder.wsdl');
h.setRequestBodyAsString(content);

h.setRequestContentType('text/xml; charset="utf-8"');
/* execute the GET */
h.executeMethod();
/* retrieve the response body as a string */

h.getResponseBodyAsString(body, rc);
put body;
end;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log:&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 proc ds2;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76 data _null_;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77 method run();&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 /* instantiate the package */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;79 declare package http h();&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;80 declare varchar(1024) body ;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;81 declare int rc;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;82&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;83 DECLARE varchar(10000) content;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;84&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;85 content=&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;86 '&amp;lt;soapenv:Envelope xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" rel="noopener"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;"&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;87 xmlns:xsd="&lt;A href="http://www.w3.org/2001/XMLSchema" target="_blank" rel="noopener"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;"&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;88 xmlns:soapenv="&lt;A href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank" rel="noopener"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;"&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;89 xmlns:soap="&lt;A href="http://www.SoapClient.com/xml/SoapResponder.xsd" target="_blank" rel="noopener"&gt;http://www.SoapClient.com/xml/SoapResponder.xsd&lt;/A&gt;"&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;90 &amp;lt;soapenv:Header/&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;91 &amp;lt;soapenv:Body&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;92 &amp;lt;soap:Method1&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;93 soapenv:encodingStyle="&lt;A href="http://schemas.xmlsoap.org/soap/encoding/" target="_blank" rel="noopener"&gt;http://schemas.xmlsoap.org/soap/encoding/&lt;/A&gt;"&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;94 &amp;lt;bstrParam1 xsi:type="xsd:string"&amp;gt;apple&amp;lt;/bstrParam1&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;95 &amp;lt;bstrParam2 xsi:type="xsd:string"&amp;gt;zebra3&amp;lt;/bstrParam2&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;96 &amp;lt;/soap:Method1&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;97 &amp;lt;/soapenv:Body&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;98 &amp;lt;/soapenv:Envelope&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;99 ;;;;' ;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;100&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;101 /* create a GET */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;102 h.createPostMethod('&lt;A href="http://soapclient.com/xml/soapresponder.wsdl" target="_blank" rel="noopener"&gt;http://soapclient.com/xml/soapresponder.wsdl&lt;/A&gt;');&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;103 h.setRequestBodyAsString(content);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;104&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;105 h.setRequestContentType('text/xml; charset="utf-8"');&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;106 /* execute the GET */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;107 h.executeMethod();&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;108 /* retrieve the response body as a string */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;109&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;110 h.getResponseBodyAsString(body, rc);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;111 put body;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;112 end;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;113&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;114 run;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&amp;lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="&lt;A href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank" rel="noopener"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;"&amp;gt; &amp;lt;SOAP-ENV:Body&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;lt;SOAP-ENV:Fault&amp;gt; &amp;lt;faultcode&amp;gt;SOAP-ENV:Client&amp;lt;/faultcode&amp;gt; &amp;lt;faultstring&amp;gt;Error Parsing Request&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Message.&amp;lt;/faultstring&amp;gt; &amp;lt;faultactor&amp;gt;/xml/soapresponder.wsdl&amp;lt;/faultactor&amp;gt; &amp;lt;detail&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;lt;e:faultdetails xmlns:e="&lt;A href="http://sqldata.com/soapfault" target="_blank" rel="noopener"&gt;http://sqldata.com/soapfault&lt;/A&gt;"&amp;gt; &amp;lt;message&amp;gt;Error at Line 1, position 562 Error c00cee2d,&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Incorrect document syntax.&amp;lt;/message&amp;gt; &amp;lt;errorcode&amp;gt;1526&amp;lt;/errorcode&amp;gt; &amp;lt;/e:faultdetails&amp;gt; &amp;lt;/detail&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;lt;/SOAP-ENV:Fault&amp;gt; &amp;lt;/SOAP-ENV:Body&amp;gt; &amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Note from DS2 package d2http:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Failed to determine character set from request content type. Defaulting to UTF-8 for encoding the request body.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Error reported by DS2 package d2http:&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Invalid character set '"utf-8"'.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Note from DS2 package d2http:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Failed to determine character set from response content type (text/xml; charset="utf-8"). Defaulting to UTF-8 for decoding&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;the response body.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Execution succeeded. No rows affected.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;115&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;116 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;128&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 11:27:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655477#M196639</guid>
      <dc:creator>zinabenammar</dc:creator>
      <dc:date>2020-06-09T11:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Call SOAP WEB Service with DS2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655484#M196641</link>
      <description>&lt;P&gt;Stabs in the dark. Instead of&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;h.setRequestContentType('text/xml; charset="utf-8"');
&lt;/LI-CODE&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;PRE class="lang-php prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;h.setRequestContentType('text&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;xml&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; charset&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;utf&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;8');&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE class="lang-php prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;h.setRequestContentType('&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;SPAN class="str"&gt;application/soap+xml&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; charset&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;utf&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;8');&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 11:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655484#M196641</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-09T11:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Call SOAP WEB Service with DS2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655511#M196651</link>
      <description>&lt;P&gt;Thank's for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried both of but i'm still having the same error :&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Failed to determine character set from request content type. Defaulting to UTF-8 for encoding the request body.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Error reported by DS2 package d2http:&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Invalid character set '"utf-8"'.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Note from DS2 package d2http:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Failed to determine character set from response content type (text/xml; charset="utf-8"). Defaulting to UTF-8 for decoding&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;the response body.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Execution succeeded. No rows affected.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 Jun 2020 13:12:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655511#M196651</guid>
      <dc:creator>zinabenammar</dc:creator>
      <dc:date>2020-06-09T13:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Call SOAP WEB Service with DS2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655646#M196706</link>
      <description>&lt;P&gt;It's strange that the error message quotes the string&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;utf-8&amp;nbsp;&lt;/FONT&gt; if you did not. No more idea, sorry.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 22:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/655646#M196706</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-09T22:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Call SOAP WEB Service with DS2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/962568#M375164</link>
      <description>&lt;P&gt;Need to add following code after&amp;nbsp;http.createPostMethod()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;http.addRequestHeader('Accept','application/vnd.sas.content.folder+json');&lt;BR /&gt;http.setRequestBodyCharacterset('utf8'); &lt;BR /&gt;http.setResponseBodyCharacterset('utf8'); &lt;BR /&gt;http.setRequestContentType('application/json');&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 04:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Call-SOAP-WEB-Service-with-DS2/m-p/962568#M375164</guid>
      <dc:creator>xup</dc:creator>
      <dc:date>2025-03-25T04:32:18Z</dc:date>
    </item>
  </channel>
</rss>

