SOAPWIPSRS Function

Calls a SAS registered Web service by using WS-Security authentication; credentials are provided in the arguments.

Category: Web Service
Notes: The credentials that are provided are used to generate a security token to call the destination service. The URL of the destination service is provided.
The Registry Service is called directly to determine how to locate the Security Token Service.

Syntax

SOAPWIPSRS (IN, URL, SRSURL<,options>)

Required Arguments

IN

specifies a character value that is the fileref. IN is used to input XML data that contains the SOAP request.

URL

specifies a character value that is the URL of the Web service endpoint.

SRSURL

specifies a character value that is the URL of the System Registry Service.

Optional Arguments

OUT

specifies a character value that is the fileref where the SOAP response output XML will be written.

SOAPACTION

specifies a character value that is a SOAPAction element to invoke on the Web service.

WSSUSERNAME

specifies a character value that is a WS-Security user name.

WSSPASSWORD

specifies a character value that is a WS-Security password, which is the password for WSSUSERNAME. Encodings that are produced by PROC PWENCODE are supported.

MUSTUNDERSTAND

specifies a numeric value that is the setting for the mustUnderstand attribute in the SOAP header.

CONFIGFILE

specifies a character value that is a Spring configuration file that is used primarily to set time-out values.

DEBUG

specifies a character value that is the full path to a file that is used for debugging logging output.

Example

The following example shows how to use the SOAPWIPSRS function in a DATA step:
FILENAME request 'c:\temp\Request.xml';
FILENAME response 'c:\temp\Response.xml';

data _null_;
   url="http://somemachine.abc.xyz.com:8080/TESTWIPSoapServices/services/
               ReportRepositoryService";
   soapaction="http://www.test.com/xml/schema/test-svcs/reportrepository-9.3/
               DirectoryServiceInterface/isDirectory";
   srsurl="http://somemachine.abc.xyz.com:8080/TESTWIPSoapServices/services/
           ServiceRegistry";
   WSSUSERNAME="user-name";
   WSSPASSWORD="password";

   rc = soapwipsrs("request", url, srsurl, "response", soapaction, wssusername,
        wsspassword);
run;

This section provides information about the SOAP request:
Request.xml:
<soapenv:Envelope xmlns:rep="http://www.test.com/xml/schema/test-svcs/
                             reportrepository-9.3"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <Action 
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://www.test.com/
       xml/schema/test-svcs/reportrepository-9.3/DirectoryServiceInterface/
       isDirectory</Action>
   </soapenv:Header>
   <soapenv:Body>
      <rep:isDirectoryDirectoryServiceInterfaceRequest>
         <rep:dirPathUrl>SBIP://Foundation/Users/someuser/My Folder
         </rep:dirPathURL>
      </rep:isDirectoryDirectoryServiceInterfaceRequest>
   </soapenv:Body>
</soapenv:Envelope>