列表 第页
我一直在关注有关RESTful服务的教程,它工作正常。然而,有一些东西我不很明白呢。这是它的外观:I've been following a tutorial about a restful service and it works fine. However there are something I dont q...阅读全文
所以,我已经有了一个pretty的简单的RESTful Web服务的球衣,而我想从我的javascript code调用它。我没有问题,执行GET请求,但由于某些原因,当我执行一个PUT,我回来了415不支持的媒体类型错误。知不知道我做错了什么?So, I've got a pretty simple RESTful...阅读全文
我要创建一个REST服务器新泽西/ Java和我发现了一个奇怪的现象。我有一个服务器上的方法,该方法返回一个对象数组为JSON @GET@Path(/文件)@Produces(MediaType.APPLICATION_JSON)公共对象的GetFiles()抛出异常{的DatabaseManager DB =新...阅读全文
网址:http://localhost:8080/RESTfulExample/rest/file/upload方法:发布回复:相同的代码正在处理 html 表单,但在邮递员中它抛出 400 BAD REQUEST,我在谷歌上查找解决方案,发现边界丢失,如何解决?因为我必须通过 Jquery 和 rest 客户端从...阅读全文
使用 jersey jersey.java.net 当 URI 中没有接受标头或 .xml 后缀时,如何将 JSON 设置为默认序列化而不是 XML?Using jersey jersey.java.net How do I set JSON as the default serialization instead...阅读全文
我看到有些人正在使用带有 Spring 的 Jersey.在 Spring 3.0 中,现在可以使用注释直接在控制器中创建 RESTful API.为什么我应该考虑使用带有 Spring 的 Jersey? 解决方案 Jersey 优点:带有规范JSR 311 JSR 311 的参考实现Restlet 和 RESTea...阅读全文
我见过许多 Atmosphere 示例,包括 pub-sub.我想做一些类似 pub-sub 的事情(客户端订阅该客户端唯一的频道;服务器定期发布到该频道),除了客户端也会向服务器发送数据.客户端将发送数据以响应服务器发送的数据,并且在其他情况下,当客户端发生服务器需要知道的重要事件(服务器不需要确认)时.I've...阅读全文
我正在尝试使用 Jersey 的 JavaScript SSE.我的资源中有以下代码.我在 Java7 和 Tomcat 7 上托管.我没有收到任何错误.但我在页面上也没有看到数据.I am trying to use JavaScript SSE from Jersey. I have Following code...阅读全文
我正在使用 Jersey 在 Java Web 服务中实现跨资源源共享.我创建的资源如下:I am implementing Cross Resource Origin Sharing in Java Web services using Jersey.I created resource as followes:...阅读全文
我有一个基于 Jersey 的 REST Web 服务,在 Glassfish 上部署时运行良好.当我在 Apache TomEE+ 1.6 版本上部署相同的战争文件时,我得到了异常I have a Jersey-based REST webservice which is working fine when dep...阅读全文
我有一个 jersey 客户端,我正试图解组一个响应实体.问题是远程 Web 服务将 application/octet-stream 作为内容类型发回,所以 Jersey 不知道如何解组它(对于 XML 等返回的 text/html 有类似的错误).我无法更改网络服务.I have a jersey client...阅读全文
如何在实现 jersey API 提供的 Exceptionmapper 的 jersey 中以编程方式注册我的提供程序?我不想使用@Provider 注解,想使用 ResourceConfig 注册提供者,我该怎么做?How do I register my provider programmatically in...阅读全文
我正在使用 Java 对 Sharepoint 2013 进行 rest api 调用.如何使用 jersey rest 客户端连接到 sharepoint 2013?I am making rest api calls to Sharepoint 2013 using Java. How can I connect...阅读全文
我正在使用运动衫.这是我的 jboss 部署结构:this is my jboss-deployment-structure:
我开发了一个 Web 服务应用程序,它在 jersey 1.x ( 1.16 ) 上运行良好我最近尝试迁移到最新的稳定球衣版本 2.8I developed a web service application which was working fine with jersey 1.x ( 1.16 )I rece...阅读全文
如何从我拥有的 JSON 输出中删除 type.我有一个包含 REST 服务输出的类/bean.我正在使用 jersey-media-moxy 进行转换.How to remove the type from the JSON output that I have. I have a class/bean that...阅读全文
我的应用程序有一些问题,我发送了一个 POST 请求,但我无法在我的服务器中检索 JsonObject,这是要发送的代码:I have some problems in my application, I send a POST request, but I cannot retrieve the JsonObjec...阅读全文
So I'm building a web application, we are using JPA and Jersey to consume/produces JSON data.I have a custom "EntityException" aswell as a custom "EntityExcepti...阅读全文
我的 RESTful 文件上传代码:My code for RESTful file upload :@Path("/upload") @POST @Consumes("multipart/form-data") public String post(@FormDataParam("part") String...阅读全文
我想将 HashMap 对象作为 POST 变量发送到 ReST 资源.我使用 Form 类来发送对象.客户端代码:I want to send a HashMap object to a ReST resource as a POST variable. I used the Form class to send...阅读全文
我正在尝试按照位于 这里的示例在为了注入我的HttpSession.不幸的是,无论我尝试什么,它都不起作用.不知道可能是什么问题.I am trying to follow the example located here to create a factory in order to inject my HttpS...阅读全文
我将球衣用于 REST WS.如何在服务器端启用球衣日志?I am using jersey for a REST WS. How do I enable jersey logs at server side?长篇大论:我得到一个客户端异常 - 但我在 tomcat 日志中看不到任何内容[它甚至没有达到我的方法]....阅读全文
我有这样一个场景,我想编写一个过滤器,我希望这个过滤器将一些对象插入到当前请求中并传递它,以便当资源类收到请求时它可以使用该对象.I have this scenario where I want to write a filter and I want this filter to insert some obje...阅读全文