I tried to create two methods as follows:

@Path("/documentView")
    @Consumes("multipart/form-data")
    @Produces("text/html") // required to work the iframe trick.
    @POST
    public Response documentViewMultipart(@Description(value = "Json
specification of the processing options.", target = DocTarget.PARAM)
                                          @Multipart(value =
"options") String optionsString,
                                          @Description(value = "Input
text", target = DocTarget.PARAM)
                                          @Multipart(value = "data")
InputStream data)

and

    @Path("/documentView")
    @Consumes("application/json")
    @Produces("application/json")
    @POST
    public Response documentView(PlainTextInputOptions ptio)

when the browser sends a multipart POST to the URL, CXF tries (and
fails) to invoke the later instead of the former. Obviously I'll
change a path to get around this.

Reply via email to