Quantcast
Channel: WCF, ASMX and other Web Services
Viewing all articles
Browse latest Browse all 555

Servie code file methods values in WSDL

$
0
0

Hi i have a service in WCF name Service1 contains Service1.svc, Service1.cs, IService1.cs

IService1.cs

using System;
using System.ServiceModel;
using System.Data;

[ServiceContract]
public interface IService
{
	[OperationContract]
    DataTable DoWork();
}

Service1.cs

using System;
using System.ServiceModel;
using System.Data;

public class Service : IService
{
	public DataTable DoWork()
	{
        DataTable dt = new DataTable();
        dt.Columns.Add("Name");
        dt.Columns.Add("Age");
        dt.Columns.Add("Desg");

        for (int i = 0; i <= 3; i++)
        {
            DataRow dr = dt.NewRow();
            dr["Name"] = "Taha" + i;
            dr["Age"] = "" + i;
            dr["Desg"] = "" + i;
            dt.Rows.Add(dr);
        }
        dt.AcceptChanges();
        return dt;
	}
}

For view the information i need to must create a client there is any another way (May be in WSDL) that i see the DataTable information which define in service.cs file

Thank you

Furthermore i set the breakpoint in service.cs file should debugging comes here...


Viewing all articles
Browse latest Browse all 555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>