Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 39131 invoked from network); 26 Jun 2006 14:01:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2006 14:01:00 -0000 Received: (qmail 42657 invoked by uid 500); 26 Jun 2006 14:00:59 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 42644 invoked by uid 500); 26 Jun 2006 14:00:59 -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 42633 invoked by uid 99); 26 Jun 2006 14:00:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 07:00:59 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of santo.prive@gmail.com designates 64.233.184.236 as permitted sender) Received: from [64.233.184.236] (HELO wr-out-0506.google.com) (64.233.184.236) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 07:00:58 -0700 Received: by wr-out-0506.google.com with SMTP id 71so40133wri for ; Mon, 26 Jun 2006 07:00:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=bUYBsETjprXVX/DW09CFGsixGN099OLCcTJyAnlIRFWSi0X/112eS9Jr147oCgNIyIHKVor6X459YZ/NPO8HLnV6ZCJfOFLjN3xKX5ubN4FKAF9jlcKAWcUB/kGN9SD0WZOjfXDfnDng68H+oP2N83L1qNnlrIh6TEiY7Z6PWPE= Received: by 10.54.142.13 with SMTP id p13mr6127944wrd; Mon, 26 Jun 2006 07:00:37 -0700 (PDT) Received: by 10.54.67.8 with HTTP; Mon, 26 Jun 2006 07:00:37 -0700 (PDT) Message-ID: <1c0978740606260700g216fa928m6aef7594d0813011@mail.gmail.com> Date: Mon, 26 Jun 2006 16:00:37 +0200 From: sANTo To: "HttpClient User Discussion" Subject: Re: garbage in responsebody In-Reply-To: <449FD8AD.3040502@dubioso.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1110_20588392.1151330437516" References: <1c0978740606260327q3d5c8db0y864a45f023f364c3@mail.gmail.com> <449FD8AD.3040502@dubioso.net> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_1110_20588392.1151330437516 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/26/06, Roland Weber wrote: > > sANTo wrote: > > > Any ideas where the garbage in responsebody comes from ? > > It comes from your *serializing* a string instead of writing > it as text. I suggest you deserialize the data on the client > to get back a string object. You're right, thanks Apparently I followed the HttpClient example too strict in that I used the getResponseBody() method instead of the getResponseBodyAsStream() method losing the deserialization (which was there in my code before the switch to HttpClient). On another note, what do you exactly mean by this: By the way, > setting the Content-Type to text/xml while you're actually > sending binary serialized objects is tight. > > Would you suggest to use "application/octet-stream" instead ? Fact is that I know for sure that the data will be xml at all times in this situation ------=_Part_1110_20588392.1151330437516--