Calls a SAS registered Web service by using WS-Security authentication; credentials are provided in the arguments.
Category: | Web Service |
Note: | This function uses the SAS environments file. |
specifies a character value that is the fileref. IN is used to input XML data that contains the SOAP request.
specifies the service name of the endpoint service as the service is stored in the Service Registry.
specifies a character value that is the fileref where the SOAP response output XML will be written.
specifies a character value that is a SOAPAction element to invoke on the Web service.
specifies a character value that is a WS-Security user name.
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.
specifies a character value that is the location of the SAS environments file.
specifies a character value that is the environment defined in the SAS environments file to use.
specifies a numeric value that is the setting for the mustUnderstand attribute in the SOAP header.
specifies a character value that is a Spring configuration file that is used primarily to set time-out values.
specifies a character value that is the full path to a file that is used for debugging logging output.
FILENAME request 'c:\temp\Request.xml'; FILENAME response 'c:\temp\Response.xml'; data _null; service="ReportRepositoryService"; soapaction="http://www.test.com/xml/schema/test-svcs/reportrepository-9.3/ DirectoryServiceInterface/isDirectory"; envfile="http://somemachine.abc.xyz.com/schemas/test-environment.xml"; environment="test"; wssusername="user-name"; wsspassword="password"; rc=soapwipservice("REQUEST", service, "RESPONSE", soapaction, wssusername, wsspassword, envfile, environment); run;
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> test-environments.xml: <environments xmlns="http://www.test.com/xml/schema/test-environments-9.3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.test.com/xml/schema/test-environments-9.3 http://www.test.com/xml/schema/test-environments-9.3/ test-environments-9.3.xsd"> <environment name="default" default="true"> <desc>Default Test Environment</desc> <service-registry>http://machine1.abc.xyz.com:8080/TESTWIPServices/remote/ serviceRegistry </service-registry> </environment> <environment name="test" default="false"> <desc>Environment for PROC SOAP testing</desc> <service-registry>http://machine2.abc.xyz.com:8080/TESTWIPSoapServices/ Service Registry/serviceRegistry </service-registry> </environment> </environments>