Previous Page | Next Page

The SOAP Procedure

Example 3: Calling a Web Service by Using a Proxy


This example calls an external Web service and therefore uses a proxy:

FILENAME REQUEST TEMP;
FILENAME RESPONSE "C:\temp\Output.xml";

data _null_;
   file request;
   input;
   put _infile_;
   datalines4;
<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:NDFDgenByDay soapenv:encodingStyle=
                        "http://schemas.xmlsoap.org/soap/encoding/">
         <latitude xsi:type="xsd:decimal">35.79</latitude>
         <longitude xsi:type="xsd:decimal">-78.82</longitude>
         <startDate xsi:type="xsd:date">2006-10-03</startDate>
         <numDays xsi:type="xsd:integer">3</numDays>
         <format xsi:type="dwml:formatType"
                 xmlns:dwml="http://www.weather.gov/forecasts/xml/
                             DWMLgen/schema/DWML.xsd">24 hourly</format>
      </ndf:NDFDgenByDay>
   </soapenv:Body>
  </soapenv:Envelope>
;;;;

proc soap in=request
          out=response
          url="http://www.weather.gov/forecasts/xml/SOAP_server/
               ndfdXMLserver.php"
          soapaction="http://www.weather.gov/forecasts/xml/DWMLgen/
                      wsdl/ndfdXML.wsdl#NDFDgenByDay"
          proxyhost="proxygw.abc.sas.com"
          proxyport=80;
run;  
  

Previous Page | Next Page | Top of Page