Jaxrs multipart

前端 未结 3 1597
你的背包
你的背包 2021-02-20 16:39

I\'m trying to perform a request to a jaxrs service which has media type set to multipart/form-data. This request contains a list of entities(xml) and an image(png,

3条回答
  •  伪装坚强ぢ
    2021-02-20 17:24

    I do not wish to include any libraries from apache.cxf, resteasy or anything of the sort. All I want to rely on is the jaxrs api

    You can't "rely on" the API, since it contains only interfaces. Classes that implement that interfaces come from RESTeasy, or Jersey, or CXF.

    and a 415 when I run the request towards an embedded openejb

    415 means "Method not supported", which happens when you send GET request to a PUT-expecting resource.

    I would recommend to use POST instead of PUT in this case. I suspect that @FormParam is not suitable to work with PUT, in your particular case.

提交回复
热议问题