开发者

How can I find out if a Web service is running or not?

I want to check availability of web service. this is my code that i running a function from web service

DataSet ds = new DataSet();
DataTable dt = new DataTable();
NegsoNotifier.WorkItemsService.WorkItemsSoapClient wiservice;

wiservice = new NegsoNotifier.WorkItemsService.WorkItemsSoapClient();
System.ServiceModel.EndpointAddress adr;
adr = new System.ServiceModel.EndpointAddress(Weburl);
wiservice.E开发者_JAVA百科ndpoint.Address = adr;
//wiservice.Open();

ds = wiservice.GetMyWorkItems(Username, Password);
dt = ds.Tables[0];

How can I understand this Web service is running or not?


If the service answers, then it was running. If it answers with an answer that is correct for the question, then it's running correctly.

Note that it could be running, but not running correctly. For instance, a database server that it needs might be down.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜