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.
精彩评论