Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 33483 invoked from network); 16 Mar 2010 08:28:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Mar 2010 08:28:51 -0000 Received: (qmail 395 invoked by uid 500); 16 Mar 2010 08:28:51 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 298 invoked by uid 500); 16 Mar 2010 08:28:51 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 290 invoked by uid 99); 16 Mar 2010 08:28:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Mar 2010 08:28:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Mar 2010 08:28:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 222E1234C48C for ; Tue, 16 Mar 2010 08:28:27 +0000 (UTC) Message-ID: <1631872105.286021268728107124.JavaMail.jira@brutus.apache.org> Date: Tue, 16 Mar 2010 08:28:27 +0000 (UTC) From: "Andreas Sahlbach (JIRA)" To: issues@cxf.apache.org Subject: [jira] Created: (CXF-2717) @FormParam can't be used with Multipart Forms MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org @FormParam can't be used with Multipart Forms --------------------------------------------- Key: CXF-2717 URL: https://issues.apache.org/jira/browse/CXF-2717 Project: CXF Issue Type: Bug Components: JAX-RS Affects Versions: 2.2.5 Reporter: Andreas Sahlbach In the JAX-RS documentation I've read the following: {quote} When handling complex multipart/form-data submissions (such as those containing files) MultipartBody (and Attachment) need to be used directly. In simpler cases, when every form part can be captured by String, the following code will suffice : @POST @Consumes("multipart/form-data") public void addForm1(@FormParam("name") String title, @FormParam("id") Long id) throws Exception { ... {quote} This is either a bug in CXF or a misleading documentation (at least for slow-minded non-native speaker like me). The big difference between @FormParam and @Multipart is, that @FormParam _always_ expects url-encoded data. So sending "A+B" using Multipart in e.g. 8-bit encoding or binary encoding delivers "A B" to @FormData annotated Strings but "A+B" to @Multipart annotated Strings. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.