代码之家  ›  专栏  ›  技术社区  ›  meena

org.apache.cxf.enterceptor.Fault:无法从消息中确定边界

  •  0
  • meena  · 技术社区  · 2 年前

    我已经创建了具有json和请求中的文件的apachecxf-rest Web服务。我正在通过Postman测试它。无法在单个post请求中同时包含json和file。

    职位申请结构:

        @Path("/file/both")
        @Consumes("multipart/mixed")
        @Produces("text/plain")
        @POST
        public String addBookFile(@Multipart("thejson") JsonPOJO request,  @Multipart("document")Attachment att) {
            return "filename:" + att.getContentDisposition().getParameter("filename");
        }
    

    问题可能在于我如何称呼Postman的服务。 enter image description here enter image description here

    0 回复  |  直到 2 年前
    推荐文章