Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 5897 invoked from network); 12 Oct 2003 13:16:51 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Oct 2003 13:16:51 -0000 Received: (qmail 87361 invoked by uid 500); 12 Oct 2003 13:16:42 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 87232 invoked by uid 500); 12 Oct 2003 13:16:40 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 87197 invoked from network); 12 Oct 2003 13:16:39 -0000 Received: from unknown (HELO zorg.miratech-software.com) (212.60.55.105) by daedalus.apache.org with SMTP; 12 Oct 2003 13:16:39 -0000 Received: from mtx-mail.msg (mtx-mail [10.16.3.2]) by zorg.miratech-software.com (Postfix) with ESMTP id A256381B for ; Sun, 12 Oct 2003 15:16:37 +0200 (CEST) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Subject: RE: [httpclient] question X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Date: Sun, 12 Oct 2003 16:16:37 +0300 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [httpclient] question Thread-Index: AcOQpfGsY/lHIPbWRFeerWdmOqHjpwAG6aOQ From: "Alexey Buistov" To: "Jakarta Commons Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello Oleg! I've reinvestigated the problem and found that you're right. The = response is being returned, but my problem still remains :( How should I implement the following using HttpClient? 1) send a business-request to server (no problem) 2) server returns confirmation response: I've just got your request and = going to process it. Standby! (no problem) 3) server processes that request and _notifies_ the client: Done = processing successfully. (that's where I've stuck. The old = implementation I try to get rid of uses some kind of socket observer = which queries the socket from time to time and finally gets the server = notification. Is this doable using HttpClient?) =20 Alexey -----Original Message----- From: Oleg Kalnichevski [mailto:olegk@bluewin.ch] Sent: Sunday, October 12, 2003 12:48 PM To: Jakarta Commons Users List Subject: Re: [httpclient] question Hi Alexey, Unless I am missing something, there is absolutely nothing you need to change in your code.=20 > HttpClient client =3D new HttpClient(); > HostConfiguration hc =3D new HostConfiguration(); > hc.setHost("localhost", 1010); > client.setHostConfiguration(hc); > PostMethod post =3D new PostMethod(); > post.setRequestBody(requestBody); > client.executeMethod(post); >=20 HTTP is a request/response oriented protocol by definition. HttpClient will not return from executeMethod until it gets a response from the server or a socket read timeout occurs (which is off per default). Httpclient will continue listening on the socket at until it receives a response status line and a number of headers from the target server.=20 Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org