title: Stateless web services do not work in HTTPS for Glassfish 3.1
body: <p>I still consider myself new to Java webservices, and I have hit a real roadblock that I cannot overcome.</p>
  
  <p>I am trying to deploy a <code>@Stateless</code> Web Service and access it's WSDL over https.  Whenever I attempt to access it I get the following error in the browser:</p>
  
  <pre><code>Error generating artifacts for the following WSDL https://localhost:8181/TestService/Test?WSDL
  
  Possible causes can be invoking https when the application is not configured for security
  </code></pre>
  
  <p>The console is showing the following errors:</p>
  
  <pre><code>INFO: parsing WSDL...
  
  WARNING: Invalid request scheme for Endpoint Test. Expected http . Received https
  INFO: [ERROR] Premature end of file.
  INFO:   line 1 of https://localhost:8181/TestService/Test?WSDL
  WARNING: Invalid request scheme for Endpoint Test. Expected http . Received https
  WARNING: MEX0008:Failed to parse metadata returned from server at https://localhost:8181/TestService/Test?WSDL using protocol SOAP_1_2. Continuing attempts.
  WARNING: Invalid request scheme for Endpoint Test. Expected http . Received https
  WARNING: MEX0008:Failed to parse metadata returned from server at https://localhost:8181/TestService/Test?WSDL using protocol SOAP_1_1. Continuing attempts.
  WARNING: Invalid request scheme for Endpoint Test. Expected http . Received https
  WARNING: MEX0008:Failed to parse metadata returned from server at https://localhost:8181/TestService/Test?WSDL/mex using protocol SOAP_1_2. Continuing attempts.
  WARNING: Invalid request scheme for Endpoint Test. Expected http . Received https
  WARNING: MEX0008:Failed to parse metadata returned from server at https://localhost:8181/TestService/Test?WSDL/mex using protocol SOAP_1_1. Continuing attempts.
  INFO: [ERROR] Premature end of file.
  Failed to read the WSDL document: https://localhost:8181/TestService/Test?WSDL, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not &lt;wsdl:definitions&gt;.
  INFO: [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s): 
   At least one WSDL with at least one service definition needs to be provided.
  INFO:   Failed to parse the WSDL.
  INFO: Invoking wsimport with https://localhost:8181/TestService/Test?WSDL
  SEVERE: wsimport failed
  </code></pre>
  
  <p>Again, this is <strong>ONLY</strong> happening when accessing it over HTTPS.  Regular HTTP is fine.  However, if I were to remove the <code>@Stateless</code> annotation, it works just fine over https.  It fails when I add the <code>@Stateless</code> annotation. </p>
  
  <p>I need the <code>@Stateless</code> annotation since I will be working with JMS Queues, and you need it when doing that.  </p>
  
  <p>Below is the code for my class:</p>
  
  <pre><code>package service.test;
  
  import javax.ejb.Stateless;
  import javax.jws.WebMethod;
  import javax.jws.WebService;
  
  @Stateless
  @WebService
  public class Test
  {
      public String hello()
      {
          return "Hello!";
      }
  
      @WebMethod
      public int addNumbers(int number1, int number2)
      {
          return number1 + number2;
      }
  }
  </code></pre>
  
  <p>So far at this point, I have never needed to utilize any web descriptors.  Everything I have done is by default handled in Eclipse automatically.  Do I have to do anything special with the descriptor files?  If so, which ones?</p>
  
  <p>Thank You</p>