Suppose in a real scenario an exception is generated in the Data access or any other layer of our application and we want to show a custom message then we can use SoapException class in System.Web.Services.Protocols which will do the trick for us. This is sample DAO class which has a method getEmpData which throws an exception 1 public class DAO 2 { 3 public DAO() 4 { 5 // 6 // TODO: Add constructor logic here 7 // 8 } 9 10 public static string getEmpData( int id) 11 { 12 throw new Exception( "Method not supported" ); 13 14 } 15 } The following is a sample Webservice with the webmethod in the same project which used the above DAO class 1 using System; 2 using System.Web; 3 using System.Web.Services; 4 using System.Web.Services.Protocols; 5 6 [WebService(Namespace = "http: //tempuri.org/")] 7 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] 8 publi
The practical "bytes" of Agile And DevOps Transformation