[ 
https://issues.apache.org/jira/browse/CXF-5935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096102#comment-14096102
 ] 

Sergey Beryozkin edited comment on CXF-5935 at 8/13/14 8:54 PM:
----------------------------------------------------------------

Thanks for your patch. 
I've applied it with few some modifications: I mapped 'anyType' to String by 
default so that it can work out of the box for simple parameters, Object would 
require a ParamConverter. Your code was fine but I thought I'd adapt to the 
code dealing with plain form parameters, that code also deals with lists/etc, 
so while your code is simpler and mine is messier :-), I hope the changes would 
more generic (all multipart/* types are supported, and the @Multipart is 
generated only if a mediaTypeMap has no a media type mapping, i,e, a WADL 
designer may want the consumer to see what parts a given multipart request 
supports but at the code generation InputStream or CXF MultipartBody can be 
preferred).
Along the way I've found a long pending bug to do with the generated 
implementation classes (-impl option) not capitalizing the interface names, so 
if a subresource QName is lower case then it would cause a compilation issue.

Hope you are OK with the above changes.
Thanks for you patch ! 


was (Author: sergey_beryozkin):
Thanks for your patch. 
I've applied it few some modifications: I mapped 'anyType' to String by default 
so that it can work out of the box for simple parameters, Object would require 
a ParamConverter. Your code was fine but I thought I'd adapt to the code 
dealing with plain form parameters, that code also deals with lists/etc, so 
while your code is simpler and mine is messier :-), I hope the changes would 
more generic (all multipart/* types are supported, and the @Multipart is 
generated only if a mediaTypeMap has no a media type mapping, i,e, a WADL 
designer may want the consumer to see what parts a given multipart request 
supports but at the code generation InputStream or CXF MultipartBody can be 
preferred).
Along the way I've found a long pending bug to do with the generated 
implementation classes (-impl option) not capitalizing the interface names, so 
if a subresource QName is lower case then it would cause a compilation issue.

Hope you are OK with the above changes.
Thanks for you patch ! 

> [wadl2java] Multipart method doesn't generate @Multipart params
> ---------------------------------------------------------------
>
>                 Key: CXF-5935
>                 URL: https://issues.apache.org/jira/browse/CXF-5935
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.7.12
>            Reporter: Alexey Markevich
>             Fix For: 2.7.13, 3.0.2, 3.1.0
>
>         Attachments: cxf-tools-wadlto-jaxrs.patch, wadl2java-multipart.zip
>
>
> Expected method signature:
> String put(@Multipart(value="action") java.io.InputStream action, 
> @Multipart(value="sources") java.io.InputStream sources);



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to