<%@ WebService Language="VB" Class="clsWeather" %>
Imports Microsoft.VisualBasic
Imports System
Imports System.Web.Services
<WebService(Namespace:="http://www.fabrikam.com/webservices")> _
Class clsWeather
<WebMethod()> Public function getConditions(strCity as string) as string
Select Case ucase(strCity)
Case "LONDON"
If month(now) <= 7 or month(now) >=9 then
getConditions = "overcast"
elseif month(now) = 8 then
GetConditions = "partly overcast"
End if
Case "SEATTLE"
If (month(now) = 7) and (day(now) = 4) then
GetConditions = "torrential rain"
Else
GetConditions = "rain"
End if
Case "LA"
GetConditions = "smoggy"
Case "PHOENIX"
GetConditions = "damn hot"
Case Else
GetConditions = "partly cloudy with a chance of showers"
End select
end function
End Class