SOAP WSDL Generate Code

AwdbWebServiceSoapBinding / getForecastEquationsMultiple

ASP AutoIt C C (Unicode) C++ C++ (Unicode) C# DataFlex Delphi Foxpro Go Java Node.js Objective-C Perl PHP Extension PowerBuilder Powershell PureBasic Python CkPython Ruby SQL Server Swift TCL VB.NET VB6 VBScript Xojo
Chilkat.Xml xml = new Chilkat.Xml();
xml.Tag = "soapenv:Envelope";
xml.AddAttribute("xmlns:awd","http://www.wcc.nrcs.usda.gov/ns/awdbWebService");
xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/");
xml.UpdateChildContent("soapenv:Header","");
xml.UpdateChildContent("soapenv:Body|awd:getForecastEquationsMultiple|awd:stationTriplets","string");

// In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required. 
xml.EmitXmlDecl = false;
string soapRequestBody = xml.GetXml();

string endpoint = "https://wcc.sc.egov.usda.gov/awdbWebService/services";
string soapAction = "";
//  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
string contentType = "text/xml";

Chilkat.Http http = new Chilkat.Http();

http.ClearHeaders();
http.SetRequestHeader("Content-Type",contentType);
http.SetRequestHeader("SOAPAction",soapAction);

Chilkat.HttpResponse resp = http.PostXml(endpoint,soapRequestBody,"utf-8");
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    Debug.WriteLine("Failed to send SOAP request.");
    return;
}

// Get the XML response body.
Chilkat.Xml responseXml = new Chilkat.Xml();
resp.GetBodyXml(responseXml);

int statusCode = resp.StatusCode;
Debug.WriteLine("response status code: " + Convert.ToString(statusCode));

// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.
if (statusCode != 200) {
    Debug.WriteLine(responseXml.GetXml());
    return;
}

Debug.WriteLine(responseXml.GetXml());

// Parse the successful SOAP response XML.

// This is a sample of the response XML, but the namespace prefixes will be different.
// We can parse the result using "*" for the namespace prefixes (see below).

string comment = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:comment");
string dataSource = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:dataSource");
string elementCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:elementCd");
string coefficient = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:coefficient");
string dataPeriodDays = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:dataPeriodDays");
string dataPeriodMonth = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:dataPeriodMonth");
string dataYearFlag = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:dataYearFlag");
string beginDate = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:beginDate");
int dataPrecision = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:dataPrecision");
string duration = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:duration");
elementCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:elementCd");
string endDate = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:endDate");
string unitCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:heightDepth|*:unitCd");
string value = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:heightDepth|*:value");
int ordinal = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:ordinal");
string originalUnitCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:originalUnitCd");
string stationTriplet = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:stationTriplet");
string storedUnitCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:storedUnitCd");
unitCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:unitCd");
string upstreamForecast = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:upstreamForecast");
string footnotes = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:footnotes");
string forecastCondition = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:forecastCondition");
string forecastPeriod = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:forecastPeriod");
string forecastType = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:forecastType");
string v_function = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:function");
string functionArgument = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:functionArgument");
string interceptConstant = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:interceptConstant");
int key = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:key");
string maxOfRecord = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:maxOfRecord");
string minOfRecord = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:minOfRecord");
string monthlyCorrelationCoefficients = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:monthlyCorrelationCoefficients");
string monthlyStderrValues = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:monthlyStderrValues");
string name = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:name");
int day = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:publicationMonthsAndDays|*:day");
int month = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:publicationMonthsAndDays|*:month");
string published = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:published");
stationTriplet = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:stationTriplet");
string transformErrorsOnly = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:transformErrorsOnly");
unitCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:unitCd");
Request XML
<soapenv:Envelope xmlns:awd="http://www.wcc.nrcs.usda.gov/ns/awdbWebService" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <awd:getForecastEquationsMultiple>
            <awd:stationTriplets>string</awd:stationTriplets>
        </awd:getForecastEquationsMultiple>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:awd="http://www.wcc.nrcs.usda.gov/ns/awdbWebService" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <awd:getForecastEquationsMultipleResponse>
            <awd:return>
                <awd:comment>string</awd:comment>
                <awd:dataSource>string</awd:dataSource>
                <awd:elementCd>string</awd:elementCd>
                <awd:equationTerms>
                    <awd:coefficient>99.0</awd:coefficient>
                    <awd:dataPeriodDays>string</awd:dataPeriodDays>
                    <awd:dataPeriodMonth>string</awd:dataPeriodMonth>
                    <awd:dataYearFlag>string</awd:dataYearFlag>
                    <awd:stationElement>
                        <awd:beginDate>string</awd:beginDate>
                        <awd:dataPrecision>1042</awd:dataPrecision>
                        <awd:duration>DAILY</awd:duration>
                        <awd:elementCd>string</awd:elementCd>
                        <awd:endDate>string</awd:endDate>
                        <awd:heightDepth>
                            <awd:unitCd>string</awd:unitCd>
                            <awd:value>99.0</awd:value>
                        </awd:heightDepth>
                        <awd:ordinal>1042</awd:ordinal>
                        <awd:originalUnitCd>string</awd:originalUnitCd>
                        <awd:stationTriplet>string</awd:stationTriplet>
                        <awd:storedUnitCd>string</awd:storedUnitCd>
                    </awd:stationElement>
                    <awd:unitCd>string</awd:unitCd>
                    <awd:upstreamForecast>true</awd:upstreamForecast>
                </awd:equationTerms>
                <awd:footnotes>string</awd:footnotes>
                <awd:forecastCondition>string</awd:forecastCondition>
                <awd:forecastPeriod>string</awd:forecastPeriod>
                <awd:forecastType>string</awd:forecastType>
                <awd:function>string</awd:function>
                <awd:functionArgument>99.0</awd:functionArgument>
                <awd:interceptConstant>99.0</awd:interceptConstant>
                <awd:key>1042</awd:key>
                <awd:maxOfRecord>99.0</awd:maxOfRecord>
                <awd:minOfRecord>99.0</awd:minOfRecord>
                <awd:monthlyCorrelationCoefficients>99.0</awd:monthlyCorrelationCoefficients>
                <awd:monthlyStderrValues>99.0</awd:monthlyStderrValues>
                <awd:name>string</awd:name>
                <awd:publicationMonthsAndDays>
                    <awd:day>1042</awd:day>
                    <awd:month>1042</awd:month>
                </awd:publicationMonthsAndDays>
                <awd:published>true</awd:published>
                <awd:stationTriplet>string</awd:stationTriplet>
                <awd:transformErrorsOnly>true</awd:transformErrorsOnly>
                <awd:unitCd>string</awd:unitCd>
            </awd:return>
        </awd:getForecastEquationsMultipleResponse>
    </soapenv:Body>
</soapenv:Envelope>