title: java.lang.IllegalArgumentException: com.bidda.Retrive is not an interface
body: <p>I have created a webservice Retrive with the following code :</p>
  
  <pre><code> @WebService(serviceName = "Retrive")
  public class Retrive {
  
  /**
   * This is a sample web service operation
   */
  @WebMethod(operationName = "hello")
  public String hello(@WebParam(name = "name") String txt) {
      return "Hello " + txt + " !";
  }
  
  /**
   * Web service operation
   */
  @WebMethod(operationName = "getData")
  public List&lt;String&gt; getData(@WebParam(name = "parameter") String parameter) {
      //TODO write your implementation code here:
      List&lt;String&gt; haha = new ArrayList&lt;String&gt;();
      try{
  
  
       Class.forName("com.mysql.jdbc.Driver");
  
  
       Connection con=DriverManager.getConnection
                      ("jdbc:mysql://localhost:3306/ws_pbl","root","");
       PreparedStatement ps =con.prepareStatement
                           ("SELECT * FROM ws_pbl.courses where name LIKE '%"+parameter+"%'");
         ResultSet rs =ps.executeQuery();
         while(rs.next()){
         haha.add(rs.getString("name"));
         }
  
       }catch(ClassNotFoundException | SQLException e)
    {
  
  
  }
       return haha;}}
  </code></pre>
  
  <p>And I have created a java servlet invoking the web service with the following code:</p>
  
  <pre><code>public class Test extends HttpServlet {
      @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8080/bidda/Retrive.wsdl")
      private Retrive_Service service;
  
  
  
  @Override
  protected void doGet(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {
  PrintWriter out = response.getWriter();
  
  
   out.print(getData("data").toString());  } private java.util.List&lt;java.lang.String&gt; getData(java.lang.String parameter) {
          // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe.
          // If the calling of port operations may lead to race condition some synchronization is required.
          com.bidda.Retrive port = service.getRetrivePort();
          return port.getData(parameter);
      }
  </code></pre>
  
  <p>When I run the servlet and invoking the web service in Netbeans, I getting the following error:</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: com.bidda.Retrive is not an interface</p>
  </blockquote>