title: throwing cutom messages in exception in soap based web services
body: <p>I am working on the web services to get some user details from Database. I am unaware of throwing and handling the exceptions.</p>
  
  <pre><code>@WebMethod(operationName ="My operataion")
      @WebResult(name="Some Type")
      public UserDetails getUserInfo(@WebParam(name="mailID")int mailID) throws SQLException{
          UserDetails user= new UserDetails();
          User umanager= new User();
          user= umanager.getUserInfo(custID);
          return user;
  
  
      }
  </code></pre>
  
  <p>I want to catch the exception at client side and I want to modify the error message like <code>"Unable to connect to Database"</code>.</p>
  
  <p>Can any one tell how to do that and send custom exceptions too.</p>
  
  <p>Thanks in Advance.</p>