Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 451 invoked from network); 16 May 2007 02:05:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 May 2007 02:05:21 -0000 Received: (qmail 79725 invoked by uid 500); 16 May 2007 02:05:27 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 79711 invoked by uid 500); 16 May 2007 02:05:27 -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 79698 invoked by uid 99); 16 May 2007 02:05:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2007 19:05:27 -0700 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=HTML_MESSAGE,MAILTO_TO_SPAM_ADDR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of xjchen001@gmail.com designates 64.233.184.239 as permitted sender) Received: from [64.233.184.239] (HELO wr-out-0506.google.com) (64.233.184.239) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2007 19:05:19 -0700 Received: by wr-out-0506.google.com with SMTP id 70so23185wra for ; Tue, 15 May 2007 19:04:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=pnXfD2wAkO6ryCsNK7c4OQ99jEPn2DAKVi7bDfw7oVv5u+d8OhLVctQxwDktyJslAvo4bIqd4XLgM7owC9Fkva3+j3gRwyhGNkz1rx9z9XNNDIZ/Z8n+ORe0QW/ML6KgrbBgQVesVHN1W0mV5xjdh2QMhTO7ypw+AXJEGxadFYA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=UVieaDWTvrO6K82ekN9xdLr0r4Ui1vAPM8NZ/8Ylk4tz+feDJUr41viLklGp7CH0mw8xiGuYnU6z5As2sw/i//0PU0pR6HIOLiKL3OEShsTVOUj6H20inQ7+C/qTWhSGwh7ixL805uOmdj4BGKE0i6zRz7c3yfsuOqXXI3QwZy8= Received: by 10.90.89.5 with SMTP id m5mr7262987agb.1179281099060; Tue, 15 May 2007 19:04:59 -0700 (PDT) Received: by 10.90.116.3 with HTTP; Tue, 15 May 2007 19:04:58 -0700 (PDT) Message-ID: <84f31d220705151904x4e56c35sa3d8b8adc7ae7077@mail.gmail.com> Date: Wed, 16 May 2007 10:04:58 +0800 From: "Xinjun Chen" To: "HttpClient User Discussion" Subject: Re: [HttpClient 3.0.1] cannot set Content-Type when using MultipartRequestEntity In-Reply-To: <84f31d220705150354x2cf8f597gffd731b68b50c7ea@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14547_22382652.1179281098991" References: <84f31d220705142203j51ce05d6udf9c3c78bebfff00@mail.gmail.com> <84f31d220705150354x2cf8f597gffd731b68b50c7ea@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_14547_22382652.1179281098991 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Roland, You mentioned that questions regarding sending SOAP with attachment appear in the maillist before, but I really cannot find it. I only find one thread regarding PostSOAP. Could you kindly give a link to the thread? By the way, is it necessary to send SOAP as a file in HttpClient? I feel sending SOAP as string part should also be OK. Please advice. Regards, Xinjun On 5/15/07, Xinjun Chen wrote: > > Sure. I'd like to add some documentation for the SOAP with attachment > using HttpClient after I successfully test all the codes. > > Regards, > Xinjun > > > On 5/15/07, Roland Weber wrote: > > > > Hello Xinjun > > > > > Do you mean I should create another RequestEntity class to extend the > > > current MultipartRequestEntity and override the getContentType() > > method? > > > > Yes. > > > > > From the getContentType() method, we can find that the contentType is > > fixed > > > to be "multipart/form-data". What if I setContentType to the post > > method > > > explicitly? Will it take any effect? > > > > There is no setContentType in PostMethod. > > > > > 2. Http contentType: > > > Before executing post method, I set the content type as follows: > > > > I have written in my previous mail that this will not take effect. > > > > > > > But the effect is that the Http body is lost inspecting from > > TCPMonitor. > > > > I suspect that you made some other mistake to loose the entity. > > > > > By the way, I searched the HttpClient documentations and samples from > > > > > Apache website, but could not find information about sending SOAP with > > > attachment files. I think this task should be quite common. If > > possible, > > > could you give me some pointer to that? > > > > Similar questions have appeared before, please search the > > mailing list archives. This project, including it's documentation, > > is a community effort. If you've got the time, please compile > > your findings in a Wiki page. Then we can point to that in > > the future. > > > > http://wiki.apache.org/jakarta-httpclient/ > > > > hope that helps, > > Roland > > > > > > > ------=_Part_14547_22382652.1179281098991--