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

Fabien Thouny edited comment on CXF-5352 at 10/24/13 12:54 AM:
---------------------------------------------------------------

Once again, you're right Sergey :-)

@FormParam works even combined with @Multipart, and so brings the support of 
such types for multipart calls.

{code}
@POST
@Consumes("multipart/form-data")
@Produces("application/xml")
Response someResource(
            @FormParam("input") BeanWithStringConstructor input,
            @FormParam("someEnum") SomeEnum someEnum
            @Multipart("sound_file") Attachment attachment);
{code}

I think you can close this issue, thanks again for your help !

Fabien


was (Author: fabien.thouny):
Once again, you're right Sergey :-)

@FormParam works either combined with @Multipart, and so brings the support of 
such types for multipart calls.

{code}
@POST
@Consumes("multipart/form-data")
@Produces("application/xml")
Response someResource(
            @FormParam("input") BeanWithStringConstructor input,
            @FormParam("someEnum") SomeEnum someEnum
            @Multipart("sound_file") Attachment attachment);
{code}

I think you can close this issue, thanks again for your help !

Fabien

> @Multipart support for types that have constructors accepting a String 
> parameter or static valueOf(String s) methods
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-5352
>                 URL: https://issues.apache.org/jira/browse/CXF-5352
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 2.7.7
>            Reporter: Fabien Thouny
>            Priority: Minor
>
> For the moment, it's not possible to have the following resource :
> {code}
> @POST
> @Produces("application/json")
> @Consumes("multipart/form-data")
> public Response multipartWithBeanAndEnum(
>     @Multipart("input") BeanWithStringConstructor input,
>     @Multipart("someEnum") SomeEnum someEnum) {
>       [...]
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to