Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 41280 invoked from network); 31 May 2008 11:47:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 May 2008 11:47:32 -0000 Received: (qmail 44553 invoked by uid 500); 31 May 2008 11:47:34 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 44531 invoked by uid 500); 31 May 2008 11:47:34 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 44520 invoked by uid 99); 31 May 2008 11:47:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 May 2008 04:47:34 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 209.85.200.169 is neither permitted nor denied by domain of nishantg@alabot.com) Received: from [209.85.200.169] (HELO wf-out-1314.google.com) (209.85.200.169) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 May 2008 11:46:43 +0000 Received: by wf-out-1314.google.com with SMTP id 23so2472583wfg.10 for ; Sat, 31 May 2008 04:46:59 -0700 (PDT) Received: by 10.142.215.5 with SMTP id n5mr2633303wfg.177.1212234419330; Sat, 31 May 2008 04:46:59 -0700 (PDT) Received: from ?192.168.0.27? ( [122.162.66.34]) by mx.google.com with ESMTPS id 22sm1998273wfd.19.2008.05.31.04.46.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 31 May 2008 04:46:58 -0700 (PDT) Message-ID: <48413AA8.8080804@alabot.com> Date: Sat, 31 May 2008 17:16:48 +0530 User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: httpclient-users@hc.apache.org Subject: mailing list Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Nishant Gupta X-Virus-Checked: Checked by ClamAV on apache.org hi, I am Facing issues regarding posting the soap xml as a string (it was working fine till i was using file) in setting post.requestEntity(); PostMethod post = new PostMethod(strURL); // Get target URL // Request content will be retrieved directly // from the input stream String xm = ".................................."; // String to be passed RequestEntity entity1 = new StringRequestEntity(xm,"SOAPREQUEST",""); //*my error is here.* I have tried passing //StringRequestEntity(content) and //StringRequestEntity(content, contenttype, charset); //RequestEntity entity = new FileRequestEntity(input, "text/xml; charset=ISO-8859-1"); //file was working fine earlier post.setRequestEntity(entity1); post.setRequestHeader("SOAPAction", strSoapAction); // Get HTTP client HttpClient httpclient = new HttpClient(); // Execute request try { int result = httpclient.executeMethod(post); response = post.getResponseBodyAsString(); System.out.println("String Response"+post.getResponseBodyAsString()); } finally { // Release current connection to the connection pool once you are done post.releaseConnection(); } --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org