cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1543474 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Date Tue, 19 Nov 2013 16:25:49 GMT
Author: sergeyb
Date: Tue Nov 19 16:25:49 2013
New Revision: 1543474

URL: http://svn.apache.org/r1543474
Log:
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.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1543462

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.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.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1543474&r1=1543473&r2=1543474&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Tue Nov 19 16:25:49 2013
@@ -681,8 +681,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) {
@@ -1228,7 +1232,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 ?



Mime
View raw message