Dim xml As NewChilkat.Xml
xml.Tag = "soapenv:Envelope"Dim success As Boolean
success = xml.AddAttribute("xmlns:awd","http://www.wcc.nrcs.usda.gov/ns/awdbWebService")
success = xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
xml.UpdateChildContent"soapenv:Header",""
xml.UpdateChildContent"soapenv:Body|awd:getForecastConfigurations|awd:forecaster","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 = FalseDim soapRequestBody As String
soapRequestBody = xml.GetXml()
Dim endpoint As String
endpoint = "https://wcc.sc.egov.usda.gov/awdbWebService/services"Dim soapAction As String
soapAction = ""// For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"Dim contentType As String
contentType = "text/xml"Dim http As NewChilkat.Http
http.ClearHeaders
http.SetRequestHeader"Content-Type",contentType
http.SetRequestHeader"SOAPAction",soapAction
Dim resp AsChilkat.HttpResponse
resp = http.PostXml(endpoint,soapRequestBody,"utf-8")
If (http.LastMethodSuccess = False) Then
System.DebugLog(http.LastErrorText)
System.DebugLog("Failed to send SOAP request.")
ReturnEnd If// Get the XML response body.Dim responseXml As NewChilkat.Xml
success = resp.GetBodyXml(responseXml)
Dim statusCode As Int32
statusCode = resp.StatusCode
System.DebugLog("response status code: " + Str(statusCode))
// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.If (statusCode <> 200) Then
System.DebugLog(responseXml.GetXml())
ReturnEnd If
System.DebugLog(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 analysisType As String
analysisType = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:analysisType")
Dim calibrationEndYear As Int32
calibrationEndYear = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:calibrationEndYear")
Dim calibrationStartYear As Int32
calibrationStartYear = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:calibrationStartYear")
Dim comment As String
comment = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:comment")
Dim componentsToRetain As Int32
componentsToRetain = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:componentsToRetain")
Dim creationDate As String
creationDate = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:creationDate")
Dim dailyForecast As String
dailyForecast = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:dailyForecast")
Dim dailyForecastThreshold As String
dailyForecastThreshold = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:dailyForecastThreshold")
Dim dailyForecastThresholdRelative As String
dailyForecastThresholdRelative = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:dailyForecastThresholdRelative")
Dim dataForcedSeriallyComplete As String
dataForcedSeriallyComplete = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:dataForcedSeriallyComplete")
Dim degreesOfFreedom As Int32
degreesOfFreedom = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:degreesOfFreedom")
Dim forecastCondition As String
forecastCondition = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:forecastCondition")
Dim forecastType As String
forecastType = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:forecastType")
Dim forecaster As String
forecaster = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:forecaster")
Dim functionArgument As String
functionArgument = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:functionArgument")
Dim functionCd As String
functionCd = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:functionCd")
Dim helperDataSource As String
helperDataSource = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperDataSource")
Dim helperElementCd As String
helperElementCd = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperElementCd")
Dim helperEndDay As Int32
helperEndDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperEndDay")
Dim helperEndMonth As Int32
helperEndMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperEndMonth")
Dim helperEndYearFlag As String
helperEndYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperEndYearFlag")
Dim helperMixedPastEndDay As Int32
helperMixedPastEndDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperMixedPastEndDay")
Dim helperMixedPastEndMonth As Int32
helperMixedPastEndMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperMixedPastEndMonth")
Dim helperMixedPastEndYearFlag As String
helperMixedPastEndYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperMixedPastEndYearFlag")
Dim helperMixedPastStartDay As Int32
helperMixedPastStartDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperMixedPastStartDay")
Dim helperMixedPastStartMonth As Int32
helperMixedPastStartMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperMixedPastStartMonth")
Dim helperMixedPastStartYearFlag As String
helperMixedPastStartYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperMixedPastStartYearFlag")
Dim helperPredictorUsed As String
helperPredictorUsed = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperPredictorUsed")
Dim helperStartDay As Int32
helperStartDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperStartDay")
Dim helperStartMonth As Int32
helperStartMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperStartMonth")
Dim helperStartYearFlag As String
helperStartYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperStartYearFlag")
Dim helperStationTriplet As String
helperStationTriplet = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperStationTriplet")
Dim helperUsedInOverlappingYears As String
helperUsedInOverlappingYears = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperUsedInOverlappingYears")
Dim helperVarianceMatchedToObserved As String
helperVarianceMatchedToObserved = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:helperVarianceMatchedToObserved")
Dim jackKnifingUsed As String
jackKnifingUsed = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:jackKnifingUsed")
Dim key As Int32
key = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:key")
Dim minimumR2ForPredictor As String
minimumR2ForPredictor = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:minimumR2ForPredictor")
Dim minimumYearsForPredictor As Int32
minimumYearsForPredictor = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:minimumYearsForPredictor")
Dim mixedPastEndDay As Int32
mixedPastEndDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:mixedPastEndDay")
Dim mixedPastEndMonth As Int32
mixedPastEndMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:mixedPastEndMonth")
Dim mixedPastEndYearFlag As String
mixedPastEndYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:mixedPastEndYearFlag")
Dim mixedPastStartDay As Int32
mixedPastStartDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:mixedPastStartDay")
Dim mixedPastStartMonth As Int32
mixedPastStartMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:mixedPastStartMonth")
Dim mixedPastStartYearFlag As String
mixedPastStartYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:mixedPastStartYearFlag")
Dim mixedPastUsed As String
mixedPastUsed = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:mixedPastUsed")
Dim name As String
name = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:name")
Dim numYearsUsed As Int32
numYearsUsed = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:numYearsUsed")
Dim optimalWeightingUsed As String
optimalWeightingUsed = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:optimalWeightingUsed")
Dim overrideAverage As String
overrideAverage = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:overrideAverage")
Dim overrideStderr As String
overrideStderr = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:overrideStderr")
Dim pastFlowRealtime As String
pastFlowRealtime = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:pastFlowRealtime")
Dim customStationListName As String
customStationListName = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:customStationListName")
Dim dataSourceCd As String
dataSourceCd = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:dataSourceCd")
Dim elementCd As String
elementCd = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:elementCd")
Dim globalMonthChangeAllowed As String
globalMonthChangeAllowed = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:globalMonthChangeAllowed")
Dim groupName As String
groupName = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:groupName")
Dim groupNumber As Int32
groupNumber = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:groupNumber")
Dim negativeWeightAllowed As String
negativeWeightAllowed = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:negativeWeightAllowed")
Dim networks As String
networks = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:networks")
Dim states As String
states = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:states")
Dim upstreamForecast As String
upstreamForecast = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictorGroups|*:upstreamForecast")
Dim endDay As Int32
endDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:endDay")
Dim endMonth As Int32
endMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:endMonth")
Dim endYearFlag As String
endYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:endYearFlag")
groupNumber = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:groupNumber")
Dim predictorNumber As Int32
predictorNumber = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:predictorNumber")
Dim predictorUsed As String
predictorUsed = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:predictorUsed")
Dim startDay As Int32
startDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:startDay")
Dim startMonth As Int32
startMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:startMonth")
Dim startYearFlag As String
startYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:startYearFlag")
Dim stationTriplet As String
stationTriplet = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:predictors|*:stationTriplet")
Dim preprocessingConstant As String
preprocessingConstant = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:preprocessingConstant")
Dim preprocessingMultiplier As String
preprocessingMultiplier = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:preprocessingMultiplier")
Dim publicationCd As String
publicationCd = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:publicationCd")
Dim TTestLimit As String
TTestLimit = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:TTestLimit")
Dim targetDataSource As String
targetDataSource = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetDataSource")
Dim targetElementCd As String
targetElementCd = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetElementCd")
Dim targetEndDay As Int32
targetEndDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetEndDay")
Dim targetEndMonth As Int32
targetEndMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetEndMonth")
Dim targetEndYearFlag As String
targetEndYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetEndYearFlag")
Dim targetStartDay As Int32
targetStartDay = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetStartDay")
Dim targetStartMonth As Int32
targetStartMonth = responseXml.GetChildIntValue("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetStartMonth")
Dim targetStartYearFlag As String
targetStartYearFlag = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetStartYearFlag")
Dim targetStationName As String
targetStationName = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetStationName")
Dim targetStationTriplet As String
targetStationTriplet = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:targetStationTriplet")
Dim transformErrorsOnly As String
transformErrorsOnly = responseXml.GetChildContent("*:Body|*:getForecastConfigurationsResponse|*:return|*:transformErrorsOnly")