Escolar Documentos
Profissional Documentos
Cultura Documentos
asmx file in NOTEPAD -> TEST IT USING BROWSER LIKE.... http://localhost/testweb.asmx 2. Create a proxy for you .asmx file using WSDL utility from .NET command prompt. Start-Programs-VS.NET 2003-VS.NET Tools-VS.NET Command prompt create a directory named bin , prompt> md bin (c://winnt//temp) prompt: >
wsdl /l:cs /n:wservice /out:bin/testweb.cs http://localhost/testweb.asmx?WSDL
/l: represents language to produce output, /n: means namespace, /out: to store output This will create, a sourcefile named testweb.cs with a namespace wservice for reference. 3. Create a dll file from the .cs to access at run time from your client. prompt > csc /t:library /out:bin\testweb.dll bin\testweb.cs csc -- csharp compiler /t -- target file is a library file means .dll /out -- to store output 4. Create your web service client inlcude the namespace and call the service.
OleDbDataAdapter da = new OleDbDataAdapter("select * from Table1", con); DataSet DS = new DataSet(); da.Fill(DS); return DS; con.Close(); con = null; } }