Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 80823 invoked from network); 9 Feb 2005 16:22:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Feb 2005 16:22:45 -0000 Received: (qmail 59146 invoked by uid 500); 9 Feb 2005 16:22:39 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 59115 invoked by uid 500); 9 Feb 2005 16:22:39 -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 59102 invoked by uid 99); 9 Feb 2005 16:22:38 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from post5.inre.asu.edu (HELO post5.inre.asu.edu) (129.219.110.120) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 09 Feb 2005 08:22:37 -0800 Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0IBN00L01K5L8P@asu.edu> for commons-user@jakarta.apache.org; Wed, 09 Feb 2005 09:22:33 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) by asu.edu (PMDF V6.1-1X6 #30769) with ESMTP id <0IBN00K4YK5JFW@asu.edu>; Wed, 09 Feb 2005 09:22:31 -0700 (MST) Received: from A2000018 (wsmoak.vpia.asu.edu [209.147.173.40]) by smtp.asu.edu (8.12.10/8.12.10/asu_smtp_relay,nullclient,tcp_wrapped) with SMTP id j19GMTMC005457; Wed, 09 Feb 2005 09:22:30 -0700 (MST) Date: Wed, 09 Feb 2005 09:22:30 -0700 From: Wendy Smoak Subject: Re: [httpclient] How to send and recieve Serialized Object using HttpClient To: Sanjeev Tripathi , commons-user@jakarta.apache.org Message-id: <022f01c50ec3$8ddcda40$28ad93d1@irm.local> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Mailer: Microsoft Outlook Express 6.00.2800.1437 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit X-Priority: 3 X-MSMail-priority: Normal References: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N From: "Sanjeev Tripathi" > I am able to send object as string same way as you suggested from http > client but from servlet I still need to use content type to > "application/octet-stream" to receive object in httpclient side but I > want to use content type "text/plain" in servlet. > If I write object as byte on respose that object I am not able to receive. > It is giving "invalid header" error in http client side. But I will try > Matt's way and let you know. If you post the code you're using, someone can probably help. I'm quite lost by now trying to remember who suggested what. If you're getting all the way to the base64 encoded byte[], can't you turn it into a String and then use that as the value of a request parameter for the POST? Wasn't that the original goal, to serialize an object, base-64 encode the binary data, and send it to the server as text? If so, there's a String constructor that takes a byte[], (and you can specify the charset if necessary). HTH, -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org