SOAPWEB Function

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

Category: Web Service

Syntax

SOAPWEB (IN, URL <,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.

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.

WEBUSERNAME

specifies a character value that is a user name for either basic or NTLM Web authentication.

WEBPASSWORD

specifies a character value that is a password for either basic or NTLM 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 for NTLM authentication.

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>