Example of a SOAP request
This example sends a request to the United States National Weather Service for forecast data that the site has available through SOAP. The entire message is encapsulated within the
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <namesp1:NDFDgenByDay xmlns:namesp1="http://weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"> <latitude xsi:type="xsd:float">44.52</latitude> <longitude xsi:type="xsd:float">-89.58</longitude> <startDate xsi:type="xsd:string">2005-04-23</startDate> <numDays xsi:type="xsd:int">5</numDays> <format xsi:type="xsd:string">12 hourly</format> </namesp1:NDFDgenByDay> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
