2 Replies Latest reply on Dec 11, 2006 3:34 AM by eric vantillard

    Missing Content-Length in response

    eric vantillard Newbie

      I am using JBOSSWS-1.0.4 on JBOSS AS 4.0.5 GA and JDK 1.5 on windows
      My webservice is a EJB 3.0 SLSB with annotations.

      My problem is pretty simple :
      In the response of my webservice, the Content-Length is always missing in the Header.

      Is this a bug ?

      Thank you.

        • 1. Re: Missing Content-Length in response
          Heiko Braun Master

          Here, this is taken from our SOAPMessageImpl.java:


          /*
          * We are lazily encoding our message, which means that currently
          * Content-Length is not being calculated. This should not be a problem
          * because HTTP/1.1 does not require that it be sent (WS Basic Profile 1.1
          * states that implementations SHOULD send HTTP 1.1). If it is determined
          * that it must be sent, this perhaps should be done by the transport
          * layer. However, there could be a space optimization where length is
          * precalulated per attachment, and that calculation would, of course,
          * belong here.
          */



          I don't consider it to be a bug. What issue's do you have with it? What client consumes that service?

          • 2. Re: Missing Content-Length in response
            eric vantillard Newbie

            Thank you very much for the response.
            I am using the GSOAP C/C++ lib for the implementation of the client.

            The GSOAP lib consider an HTTP 500 response without content as a failure and not as a SOAP FAULT.
            And the library use the header Content-Length to know if the response is empty or not.