开发者

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

开发者 https://www.devze.com 2023-01-05 19:28 出处:网络
I want to check availability of web service. this is my code that i running a function from web service

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

精彩评论

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

关注公众号