Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 58463 invoked from network); 25 May 2005 12:07:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 May 2005 12:07:32 -0000 Received: (qmail 33727 invoked by uid 500); 25 May 2005 12:07:31 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 33690 invoked by uid 500); 25 May 2005 12:07:30 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 33672 invoked by uid 99); 25 May 2005 12:07:30 -0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,FORGED_YAHOO_RCVD,HTML_20_30,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web32613.mail.mud.yahoo.com (HELO web32613.mail.mud.yahoo.com) (68.142.207.240) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 25 May 2005 05:07:26 -0700 Received: (qmail 67081 invoked by uid 60001); 25 May 2005 12:07:25 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=Zu9RN1w+0Af5x34J53Q0Tq11ihjX1RnszitHJcUqyn/pUteK0WWupOPO3T/AqhU27hHZGMTXcBvhqGQK/aGHNnxFOwx1glBMpJS7FTu0AGRr9Umb8Lo940q8HG50x+M08DPRZQcDVbeouwZO2poY8GtvwTO6v/B7xjXFIWqI4ic= ; Message-ID: <20050525120725.67079.qmail@web32613.mail.mud.yahoo.com> Received: from [202.144.106.3] by web32613.mail.mud.yahoo.com via HTTP; Wed, 25 May 2005 05:07:24 PDT Date: Wed, 25 May 2005 05:07:24 -0700 (PDT) From: Naresh Agarwal Subject: Re: R: session maintenance with two different HttpClient objects To: HttpClient User Discussion In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1713867575-1117022844=:66505" X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1713867575-1117022844=:66505 Content-Type: text/plain; charset=us-ascii Hi This works. But I don't have access to obj1 when I'm calling "getDetails" using obj2. I'm calling "login" and "getDetails" in two different entities using obj1 and obj2 respectively, which *cannot* share anything in memory. However I can extract cookie from response of "login", store the cookie in some file and read this cookie from the file to set it in obj2 before calling "getDetails. But this is not working from me. thanks, Naresh Andrea Sodomaco wrote: Hi, Try obj2.setState(obj1.getState()); can it help you? Andrea Sodomaco -----Messaggio originale----- Da: Naresh Agarwal [mailto:naresh_iitd@yahoo.com] Inviato: luned� 23 maggio 2005 15.32 A: httpclient-user@jakarta.apache.org Oggetto: session maintenance with two different HttpClient objects Hi I'm using HttpClient library for writing a specialized http client. Let's say I have two instances of HttpClient object obj1 and obj2, which communicate with same application running in web server. This application provide two operations - "login" and "getDetails", which need session maintenance using cookies. I am using obj1 and obj2 as follows - 1. Call "login" operation using obj1 and extract the cookie from the response. 2. Call "getDetails" operation using obj2 after setting cookie extracted in step 1. But my "getDetails" fails saying that login is required. However, if I use obj1 in step 2, it works fine. Basically, I've a special requirement to use *two different* instances of HttpClient to communicate with same web service (which needs session maintenance). Am I missing something? Does session maintenace works only if all the operations are called using same HttpClient object? Any help will be greatly appreciated. thanks & regards, Naresh Agarwal __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org --------------------------------- Do You Yahoo!? Yahoo! Small Business - Try our new Resources site! --0-1713867575-1117022844=:66505--