A message body writer for Java type, class myPackage.B, and MIME media type, application/octet-stream, was not found

后端 未结 10 1398

I am new at RESTful webservices and was trying to update my @OneToMany relationship from a standalone client application, but I am not able to do that. I am usi

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 07:10

    You need to specify the @Provider that @Produces(MediaType.APPLICATION_XML) from B.class
    An add the package of your MessageBodyWriter to your /WEB_INF/web.xml as:

    
    com.sun.jersey.config.property.packages
    
    your.providers.package
    
    
    

提交回复
热议问题