You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Brian Andle (Jira)" <ji...@apache.org> on 2023/10/20 18:05:00 UTC
[jira] [Comment Edited] (CXF-8669) Multipart annotation not working 3.4.6 onwards.
[ https://issues.apache.org/jira/browse/CXF-8669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17777882#comment-17777882 ]
Brian Andle edited comment on CXF-8669 at 10/20/23 6:04 PM:
------------------------------------------------------------
Is it possible to indicate this somewhere as a breaking change, and maybe an example using xml? It took a while to find the issue (full day) and then tracked down to CXF-8627 and then this ticket. I have not been successful using the java param:
{code:java}
-Dorg.apache.cxf.attachment.content-type=text/plain {code}
Or defining the following as part of the spring xml where we define our jaxrs:server apis
{code:java}
<cxf:bus>
<cxf:properties>
<entry key="org.apache.cxf.attachment.content-type" value="text/plain"/>
</cxf:properties>
</cxf:bus> {code}
Looks like the following works for us, in case anyone else sees this:
{code:java}
<jaxrs:server id="apiServer" address="/">
....
<jaxrs:properties>
<entry key="org.apache.cxf.attachment.content-type" value="text/plain"/>
</jaxrs:properties>
</jaxrs:server> {code}
was (Author: JIRAUSER287474):
Is it possible to indicate this somewhere as a breaking change, and maybe an example using xml? It took a while to find the issue (full day) and then tracked down to CXF-8627 and then this ticket. I have not been successful using the java param:
{code:java}
-Dorg.apache.cxf.attachment.content-type=text/plain {code}
Or defining the following as part of the spring xml where we define our jaxrs:server apis
{code:java}
<cxf:bus>
<cxf:properties>
<entry key="org.apache.cxf.attachment.content-type" value="text/plain"/>
</cxf:properties>
</cxf:bus> {code}
> Multipart annotation not working 3.4.6 onwards.
> -----------------------------------------------
>
> Key: CXF-8669
> URL: https://issues.apache.org/jira/browse/CXF-8669
> Project: CXF
> Issue Type: Bug
> Affects Versions: 3.4.6, 3.5.5
> Reporter: Abhishek Rana
> Assignee: Andriy Redko
> Priority: Major
> Fix For: 3.6.0, 4.0.1, 3.5.6, 3.4.11
>
>
> Hello Team,
> I have following API declaration
> {code:java}
> @POST
> @Path("/{configurationName}.diff")
> @Consumes(MediaType.MULTIPART_FORM_DATA)
> @Produces({MediaType.APPLICATION_JSON})
> ConfigurationDiffDTO diff(@PathParam("configurationName") String configurationName,
> @Multipart(value = "fromRev", required = false) Long fromRev, @Multipart(value = "toRev", required = false) Long toRev, @Multipart(value = "file", required = false) Attachment file);
> {code}
> Above declaration works fine till 3.4.5 , after I upgraded to 3.5.0 (even 3.4.6) , multipart form values (fromRev and toRev) they are coming as null.
> Is it a regression?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)