SOAP Procedure

Example 4: Calling a SAS Registered Web Service Using the Service Registry Service

Details

This example calls a SAS registered Web service by using the service URL and the Service Registry Service.

Program

filename request temp;
filename response "c:\temp\output.xml";

data _null_;
   file request;
   input;
   put _infile_;
   datalines4;

<soapenv:Envelope xmlns:rep="http://www.sas.com/xml/schema/sas-svcs/reportrepository-9.2" 
                  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header>
      <Action
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
       http://www.sas.com/xml/schema/sas-svcs/reportrepository-9.2/DirectoryServiceInterface/isDirectory</Action>
  </soapenv:Header>
  <soapenv:Body>
     <rep:isDirectoryDirectoryServiceInterfaceRequest>
        <rep:dirPathUrl>SBIP:path-name</rep:dirPathUrl>
     </rep:isDirectoryDirectoryServiceInterfaceRequest>
  </soapenv:Body>
</soapenv:Envelope>
;;;;
run;

proc soap in=request out=response
   url="http://machine-name:port-number/SASWIPSoapServices/services/ReportRepositoryService"
   soapaction="http://www.sas.com/xml/schema/sas-svcs/reportrepository-9.2/DirectoryServiceInterface/isDirectory"
   srsurl="http://machine-name:port-number/SASWIPSoapServices/services/ServiceRegistry" 
   wssusername="user-name" 
   wsspassword="password";
run;