title: Webservice with different datatype?
body: <p>I'm writing one of my very first web-service, as far as now it was more than ok, but when I'm trying to create sperate class:</p>
  
  <pre><code>public class Workers {
  
  private String name;
  private String surname;
  private boolean type;
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  public String getSurname() {
      return surname;
  }
  
  public void setSurname(String surname) {
      this.surname = surname;
  }
  
  public boolean isType() {
      return type;
  }
  
  public void setType(boolean type) {
      this.type = type;
  }
  
  public Workers(String name, String surname, boolean type) {
      this.name = name;
      this.surname = surname;
      this.type = type;
  }
  
  
  
  }
  </code></pre>
  
  <p>and than to use it in webservice like this:</p>
  
  <pre><code>@WebMethod(operationName = "SelectWorker")
  public Pracownicy SelectWorker(@WebParam(name = "username") String username,       @WebParam(name = "password") String password) {
  
     ResultSet rs = null;
     String name = null;
     String surname = null;
     boolean type = false;
  
      PreparedStatement st = null;
      try {
          Class.forName("com.mysql.jdbc.Driver");
          Connection con = DriverManager.getConnection("db_address", "login", "password");
          System.out.println("connection status: " +con);
          st = con.prepareStatement("select name, surname from clients where login = ? and  passwd= ?");
          st.setString(1, username);
          st.setString(2, password);
          rs = st.executeQuery();
  
          if (rs.next()) {
             name = rs.getString(2);
             surname=rs.getString(3);
             type = rs.getBoolean(5);
             Workers pr = new Workers(name, surname, type);
             return pr;
          }
      } catch (Exception e) {
          System.out.println("error: " + e.toString());
      }
  
  
      return null;
  }
  </code></pre>
  
  <p>the body of method can be empty or filled with code, it doesn't matter - I'm getting the same error:</p>
  
  <pre><code>Error occurred during deployment: Exception while loading the app    
  :java.lang.IllegalStateException: ContainerBase.addChild: start:
  org.apache.catalina.LifecycleException: java.lang.RuntimeException: Servlet web 
  service endpoint '' failure.
  </code></pre>
  
  <p>Are the int, string, boolean etc only allowed as return type? </p>