You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Fabien Thouny (JIRA)" <ji...@apache.org> on 2013/10/24 02:54:43 UTC
[jira] [Comment Edited] (CXF-5352) @Multipart support for types
that have constructors accepting a String parameter or static
valueOf(String s) methods
[ 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)