1 Reply Latest reply on Feb 20, 2007 2:51 AM by Dzihan

    cookie header in webservice calls

    Dzihan Level 1
      Hello guys,

      i need to find a way to add a cookie header to my webservice, that contains a JSESSIONID.

      Normally, i do a URLRequest on a login script. After that, all Webservice calls use a cookie with the proper sessionId automatlically. (I don't know why but it works :)).

      Now i want the Webservices run WITHOUT the login passing the the sessionId manually as cookie information in the header of my calls.

      How can i do it?

      I tried the addSimpleHeader() and addHeader() methods of the WebService class but i had no luck.

      Maybe someone knows about this?
        • 1. Re: cookie header in webservice calls
          Dzihan Level 1
          I sniffed the Information that is sent by my calls:

          Transmission Control Protocol, Src Port: 3062 (3062), Dst Port: 8080 (8080), Seq: 1, Ack: 1, Len: 463
          Hypertext Transfer Protocol
          GET /myapp/services/MyService?wsdl HTTP/1.1\r\n
          Host: 192.168.0.61:8080\r\n
          User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1\r\n
          Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png ,*/*;q=0.5\r\n
          Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3\r\n
          Accept-Encoding: gzip,deflate\r\n
          Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
          Keep-Alive: 300\r\n
          Connection: keep-alive\r\n
          \r\n

          SHOULD LOOK LIKE:

          Transmission Control Protocol, Src Port: 3062 (3062), Dst Port: 8080 (8080), Seq: 1, Ack: 1, Len: 463
          Hypertext Transfer Protocol
          GET /myapp/services/MyService?wsdl HTTP/1.1\r\n
          Host: 192.168.0.61:8080\r\n
          User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1\r\n
          Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png ,*/*;q=0.5\r\n
          Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3\r\n
          Accept-Encoding: gzip,deflate\r\n
          Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
          Keep-Alive: 300\r\n
          Connection: keep-alive\r\n
          Cookie: JSESSIONID=12345678abcdefgh
          \r\n

          Maybe that makes it clearer a little bit.