Consuming a multipart/form-data via RESTful CXF

后端 未结 3 489
再見小時候
再見小時候 2021-01-05 04:59

I\'ve been working in a webservice that consumes and produces JSON files using Apache CXF in conjuction with Jackson.
However, one of the service\'s methods should be

3条回答
  •  日久生厌
    2021-01-05 05:22

    I faced similar issue sometime back.

    The following code did the trick for me

    @POST
    @Consumes("multipart/form-data")
    public void yourMethod() throws Exception {
    }
    

    In short, it is I think the @Consumes annotation you are missing.

提交回复
热议问题