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
Dim xml As 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
Dim soapRequestBody As String = xml.GetXml()

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

Dim http As New Chilkat.Http

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

Dim resp As Chilkat.HttpResponse = http.PostXml(endpoint,soapRequestBody,"utf-8")
If (http.LastMethodSuccess = False) Then
    Debug.WriteLine(http.LastErrorText)
    Debug.WriteLine("Failed to send SOAP request.")
    Exit Sub
End If


' Get the XML response body.
Dim responseXml As New Chilkat.Xml
resp.GetBodyXml(responseXml)

Dim statusCode As Integer = resp.StatusCode
Debug.WriteLine("response status code: " & statusCode)



' If the status code does not indicate succcess, then show the response XML,
' which probably contains error information.
If (statusCode <> 200) Then
    Debug.WriteLine(responseXml.GetXml())
    Exit Sub
End If


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).


Dim comment As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:comment")
Dim dataSource As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:dataSource")
Dim elementCd As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:elementCd")
Dim coefficient As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:coefficient")
Dim dataPeriodDays As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:dataPeriodDays")
Dim dataPeriodMonth As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:dataPeriodMonth")
Dim dataYearFlag As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:dataYearFlag")
Dim beginDate As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:beginDate")
Dim dataPrecision As Integer = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:dataPrecision")
Dim duration As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:duration")
elementCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:elementCd")
Dim endDate As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:endDate")
Dim unitCd As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:heightDepth|*:unitCd")
Dim value As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:heightDepth|*:value")
Dim ordinal As Integer = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:ordinal")
Dim originalUnitCd As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:originalUnitCd")
Dim stationTriplet As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:stationTriplet")
Dim storedUnitCd As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:stationElement|*:storedUnitCd")
unitCd = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:unitCd")
Dim upstreamForecast As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:equationTerms|*:upstreamForecast")
Dim footnotes As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:footnotes")
Dim forecastCondition As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:forecastCondition")
Dim forecastPeriod As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:forecastPeriod")
Dim forecastType As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:forecastType")
Dim v_function As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:function")
Dim functionArgument As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:functionArgument")
Dim interceptConstant As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:interceptConstant")
Dim key As Integer = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:key")
Dim maxOfRecord As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:maxOfRecord")
Dim minOfRecord As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:minOfRecord")
Dim monthlyCorrelationCoefficients As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:monthlyCorrelationCoefficients")
Dim monthlyStderrValues As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:monthlyStderrValues")
Dim name As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:name")
Dim day As Integer = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:publicationMonthsAndDays|*:day")
Dim month As Integer = responseXml.GetChildIntValue("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:publicationMonthsAndDays|*:month")
Dim published As String = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:published")
stationTriplet = responseXml.GetChildContent("*:Body|*:getForecastEquationsMultipleResponse|*:return|*:stationTriplet")
Dim transformErrorsOnly As String = 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>