cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1543462 - /cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Date Tue, 19 Nov 2013 15:51:50 GMT
Author: sergeyb
Date: Tue Nov 19 15:51:49 2013
New Revision: 1543462

URL: http://svn.apache.org/r1543462
Log:
[CXF-5386] Updating WadlGenerator to recognize multipart InputStream parameters

Modified:
    cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java

Modified: cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1543462&r1=1543461&r2=1543462&view=diff
==============================================================================
--- cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
(original)
+++ cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
Tue Nov 19 15:51:49 2013
@@ -698,8 +698,12 @@ public class WadlGenerator implements Co
         }
 
         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) {
@@ -1262,7 +1266,7 @@ public class WadlGenerator implements Co
     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