The SOAP procedure generates no results or an error


In SAS® Viya® 3.x, PROC SOAP in SAS® Studio generates no results on the first submission. On the second submission, the following error is generated:

ERROR: java.lang.ClassNotFoundException: com.sas.tk.tkwsc.SoapThread

From a batch submission, PROC SOAP generates the following error:

ERROR: The Java picklist property is not specified.

The workaround is to recode by using the HTTP procedure. The Full Code section shows the sample PROC SOAP code that is recoded into PROC HTTP syntax.

Full Code

The PROC SOAP code is recoded into PROC HTTP syntax.

FILENAME request temp ;
FILENAME response temp ;
 
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:Add>
         <tem:intA>7</tem:intA>
         <tem:intB>4</tem:intB>
      </tem:Add>
   </soapenv:Body>
</soapenv:Envelope>
;;;;

proc soap
   in=request
   out=response
   url="http://www.dneonline.com/calculator.asmx"
   soapaction="http://tempuri.org/Add";
run;

/* Recode using PROC HTTP */

proc http 
   in=request
   out=response
   method="post"
   url="http://www.dneonline.com/calculator.asmx"
/*  Use if a proxy is necessary: proxyhost="localhost"  proxyport=8888 */;
     headers "Content-Type"="text/xml; charset=UTF-8"
             "SOAPAction"="http://tempuri.org/Add";
debug level=2;
run;

%put FROM HTTP:;

data _null_;
    infile response;
    input;
    put _infile_;
run;