Imports System.Web.Services <System.Web.Services.WebService(Namespace := "http://tempuri.org/label/label_xml_soap")> _ Public Class label_xml_soap Inherits System.Web.Services.WebService #Region " À¥ ¼­ºñ½º µðÀÚÀ̳ʿ¡¼­ »ý¼ºÇÑ ÄÚµå " Public Sub New() MyBase.New() 'ÀÌ È£ÃâÀº À¥ ¼­ºñ½º µðÀÚÀ̳ʿ¡ ÇÊ¿äÇÕ´Ï´Ù. InitializeComponent() 'InitializeComponent()¸¦ È£ÃâÇÑ ´ÙÀ½¿¡´Â »ç¿ëÀÚ °íÀ¯ÀÇ ÃʱâÈ­ Äڵ带 Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù. End Sub 'À¥ ¼­ºñ½º µðÀÚÀ̳ʿ¡ ÇÊ¿äÇÕ´Ï´Ù. Private components As System.ComponentModel.IContainer 'Âü°í: ´ÙÀ½ ÇÁ·Î½ÃÀú´Â À¥ ¼­ºñ½º µðÀÚÀ̳ʿ¡ ÇÊ¿äÇÕ´Ï´Ù. 'À¥ ¼­ºñ½º µðÀÚÀ̳ʸ¦ »ç¿ëÇÏ¿© ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. 'ÄÚµå ÆíÁý±â¸¦ »ç¿ëÇÏ¿© ¼öÁ¤ÇÏÁö ¸¶½Ê½Ã¿À. Friend WithEvents OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.OleDbDataAdapter1 = New System.Data.OleDb.OleDbDataAdapter Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection ' 'OleDbDataAdapter1 ' Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1 Me.OleDbDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "Customers", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("CustomerID", "CustomerID"), New System.Data.Common.DataColumnMapping("CompanyName", "CompanyName"), New System.Data.Common.DataColumnMapping("ContactName", "ContactName"), New System.Data.Common.DataColumnMapping("ContactTitle", "ContactTitle"), New System.Data.Common.DataColumnMapping("Address", "Address"), New System.Data.Common.DataColumnMapping("City", "City"), New System.Data.Common.DataColumnMapping("Region", "Region"), New System.Data.Common.DataColumnMapping("PostalCode", "PostalCode"), New System.Data.Common.DataColumnMapping("Country", "Country"), New System.Data.Common.DataColumnMapping("Phone", "Phone"), New System.Data.Common.DataColumnMapping("Fax", "Fax")})}) ' ' 'OleDbConnection1 ' Me.OleDbConnection1.ConnectionString = "User ID=sa;Tag with column collation when possible=False;Data Source=hwabong;Pass" & _ "word=cab123;Initial Catalog=NWind;Use Procedure for Prepare=1;Auto Translate=Tru" & _ "e;Persist Security Info=True;Provider=""SQLOLEDB.1"";Workstation ID=HWABONG;Use En" & _ "cryption for Data=False;Packet Size=4096" End Sub Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) 'CODEGEN: ÀÌ ÇÁ·Î½ÃÀú´Â À¥ ¼­ºñ½º µðÀÚÀ̳ʿ¡ ÇÊ¿äÇÕ´Ï´Ù. 'ÄÚµå ÆíÁý±â¸¦ »ç¿ëÇÏ¿© ¼öÁ¤ÇÏÁö ¸¶½Ê½Ã¿À. If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub #End Region ' À¥ ¼­ºñ½º ¿¹Á¦ ' HelloWorld() ¿¹Á¦ ¼­ºñ½º´Â Hello World¶ó´Â ¹®ÀÚ¿­À» ¹ÝȯÇÕ´Ï´Ù. ' ºôµåÇÏ·Á¸é ´ÙÀ½ ÁÙÀÇ ÁÖ¼® 󸮸¦ Á¦°ÅÇϰí ÀúÀåÇÑ ÈÄ ÇØ´ç ÇÁ·ÎÁ§Æ®¸¦ ºôµåÇÕ´Ï´Ù. ' ÀÌ À¥ ¼­ºñ½º¸¦ Å×½ºÆ®ÇÏ·Á¸é .asmx ÆÄÀÏÀÌ ½ÃÀÛ ÆäÀÌÁöÀÎÁö È®ÀÎÇϰí ' <F5> ۸¦ ´©¸¨´Ï´Ù. ' ''<WebMethod()> _ ''Public Function HelloWorld() As String '' Return "Hello World" ''End Function <WebMethod()> _ Public Function Get_Customers(ByVal City As String) As System.Xml.XmlDocument Me.OleDbConnection1.Open() Dim myds As DataSet Dim returnXML As System.Xml.XmlDocument myds = New DataSet("root") returnXML = New System.Xml.XmlDocument 'OleDbSelectCommand1 ' Me.OleDbSelectCommand1.CommandText = "SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region," & _ " PostalCode, Country, Phone, Fax FROM Customers Where City like '%" & City.ToString & "%'" Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1 Me.OleDbDataAdapter1.Fill(myds, "¹Þ´Â»ç¶÷") returnXML.LoadXml(myds.GetXml()) Me.OleDbConnection1.Close() Return returnXML End Function End Class