Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

<WebService(Namespace:="http://mycompany.com/post")> _
Public Class PostalWebService
    Inherits System.Web.Services.WebService

    <WebMethod(Description:="Gets tracking information about a package.")> _
    Public Function GetPackageInfo(ByVal TrackID As String) _
      As ClientPackageInfo
        System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10))
        Dim PackageInfo As Package
        PackageInfo = GetPackageRecordFromDB(TrackID)
        Return PackageInfo.BasicInfo
    End Function

    Private Function GetPackageRecordFromDB(ByVal TrackID As String) _
      As Package
        ' Some database access code here.
        Dim PackageInfo As New Package()

        ' To perform a crude test, uncomment the following two lines.
        PackageInfo.BasicInfo.PackageID = TrackID
        PackageInfo.BasicInfo.DeliveryDate = Now

        Return PackageInfo
    End Function

End Class

Public Class Package
    Public BasicInfo As New ClientPackageInfo
    Public CreditCardNumber As String
End Class

Public Class ClientPackageInfo
    Public PackageID As String
    Public DeliveryDate As Date
End Class

