SOAPWEB Function

Calls a web service by using basic web authentication; credentials are provided in the arguments.

Category:Web Service
Restriction:This function is not valid on the CAS server.

Syntax

SOAPWEB(IN, URL <, option(s)>)

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.

Optional Argument

option

specifies an option that you can use with the SOAPWEB function. The following options are available:

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.

WEBUSERNAME

specifies a character value that is a user name for basic web authentication.

WEBPASSWORD

specifies a character value that is a password for basic web authentication. Encodings that are produced by PROC PWENCODE are supported.

WEBDOMAIN

specifies a character value that is the domain or realm for the user name and password.

MUSTUNDERSTAND

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

PROXYPORT

specifies a numeric value that is an HTTP proxy server port.

PROXYHOST

specifies a character value that is an HTTP proxy server host.

PROXYUSERNAME

specifies a character value that is an HTTP proxy server user name.

PROXYPASSWORD

specifies a character value that is an HTTP proxy server password. Encodings that are produced by PROC PWENCODE are supported.

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 SOAPWEB function in a DATA step:
FILENAME request 'c:\temp\Request.xml';
FILENAME response 'c:\temp\Response.xml';

data _null_;
   url="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php";
   soapaction=
   "http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#CornerPoints";
   proxyhost="someproxy.abc.xyz.com";
   proxyport=80;

   rc = soapweb("request", url, "response", soapaction, , , , , proxyport, 
        proxyhost);
run;

This section provides information about the SOAP request:
Request.xml:
<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:ndf="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">
   <soapenv:Header/>
   <soapenv:Body>
      <ndf:CornerPoints soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/
           encoding/">
         <sector xsi:type="dwml:sectorType" 
xmlns:dwml="http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd">
      alaska</sector>
      </ndf:CornerPoints>
   </soapenv:Body>
</soapenv:Envelope>
Last updated: March 16, 2017