Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4825C10121 for ; Tue, 19 Nov 2013 16:31:49 +0000 (UTC) Received: (qmail 36528 invoked by uid 500); 19 Nov 2013 16:31:40 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 36301 invoked by uid 500); 19 Nov 2013 16:31:37 -0000 Mailing-List: contact commits-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 commits@cxf.apache.org Received: (qmail 36231 invoked by uid 99); 19 Nov 2013 16:31:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Nov 2013 16:31:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Nov 2013 16:31:33 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D0AD82388B46; Tue, 19 Nov 2013 16:31:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1543478 - in /cxf/branches/2.6.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java Date: Tue, 19 Nov 2013 16:31:13 -0000 To: commits@cxf.apache.org From: sergeyb@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131119163113.D0AD82388B46@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sergeyb Date: Tue Nov 19 16:31:13 2013 New Revision: 1543478 URL: http://svn.apache.org/r1543478 Log: Merged revisions 1543474 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes ................ r1543474 | sergeyb | 2013-11-19 16:25:49 +0000 (Tue, 19 Nov 2013) | 9 lines Merged revisions 1543462 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1543462 | sergeyb | 2013-11-19 15:51:49 +0000 (Tue, 19 Nov 2013) | 1 line [CXF-5386] Updating WadlGenerator to recognize multipart InputStream parameters ........ ................ Modified: cxf/branches/2.6.x-fixes/ (props changed) cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java Propchange: cxf/branches/2.6.x-fixes/ ------------------------------------------------------------------------------ Merged /cxf/branches/2.7.x-fixes:r1543474 Merged /cxf/trunk:r1543462 Propchange: cxf/branches/2.6.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1543478&r1=1543477&r2=1543478&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java (original) +++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java Tue Nov 19 16:31:13 2013 @@ -630,8 +630,12 @@ public class WadlGenerator implements Re } String value = XmlSchemaPrimitiveUtils.getSchemaRepresentation(type); - if (value == null && type.isEnum()) { - value = "xs:string"; + if (value == null) { + if (type.isEnum()) { + value = "xs:string"; + } else if (type == InputStream.class) { + value = "xs:anyType"; + } } if (value != null) { if (isJson) { @@ -1103,7 +1107,7 @@ public class WadlGenerator implements Re private boolean isFormParameter(Parameter pm, Class type, Annotation[] anns) { return ParameterType.FORM == pm.getType() || ParameterType.REQUEST_BODY == pm.getType() && AnnotationUtils.getAnnotation(anns, Multipart.class) != null - && InjectionUtils.isPrimitive(type); + && (InjectionUtils.isPrimitive(type) || type == InputStream.class); } // TODO : can we reuse this block with JAXBBinding somehow ?