Языки информационного обмена

Пример 13.2

Imports System.Web.Services


Public Class Service1

Inherits System.Web.Services.WebService

#Region " Web Services Designer Generated Code "

Public Sub New()


'This call is required by the Web Services Designer.


'Add your own initialization code after the InitializeComponent() call

End Sub

'Required by the Web Services Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Web Services Designer

'It can be modified using the Web Services Designer.

'Do not modify it using the code editor.

Friend WithEvents DataSet1 As System.Data.DataSet

Private Sub InitializeComponent()

Me.DataSet1 = New System.Data.DataSet()

CType(Me.DataSet1, System.ComponentModel.ISupportInitialize).BeginInit()




Me.DataSet1.DataSetName = "NewDataSet"

Me.DataSet1.Locale = New System.Globalization.CultureInfo("ru-RU")

CType(Me.DataSet1, System.ComponentModel.ISupportInitialize).EndInit()

End Sub

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

'CODEGEN: This procedure is required by the Web Services Designer

'Do not modify it using the code editor.

If disposing Then

If Not (components Is Nothing) Then


End If

End If


End Sub

#End Region

Public Function XMLData(ByVal file As String) As DataSet

Dim FS As IO.FileStream

Dim Reader As IO.StreamReader

FS = New IO.FileStream(Server.MapPath(file), IO.FileMode.Open, IO.FileAccess.Read)

Reader = New IO.StreamReader(FS)



XMLData = DataSet1

End Function

End Class

Содержание  Назад  Вперед