resteasy

ClassNotFound Exception when configuring RestEasy

拈花ヽ惹草 提交于 2019-12-23 02:02:55
问题 I'm having trouble while configuring RestEasy with Jboss 5.1GA. I have done everything that the installation manual says to do, Basically downloaded the restEasy zip, copied all the jars inside the lib folder to my war and configured the web.xml like this: <listener> <listener-class> org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap </listener-class> </listener> <servlet> <servlet-name>Resteasy</servlet-name> <servlet-class> org.jboss.resteasy.plugins.server.servlet

Resteasy deploy fails randomly on glassfish 4.1

廉价感情. 提交于 2019-12-23 01:19:20
问题 I have a problem with my REST-Application using Resteasy. When I deploy the application with this dependencies <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-servlet-initializer</artifactId> <version>3.0.11.Final</version> </dependency> as described here in Chapter 3.5 sometimes the server deploys the application correctly and everything works fine. But sometimes I get Error invoking ServletContainerInitializer org.jboss.resteasy.plugins.servlet

Accessing @Local Session Bean from an exposed RESTeasy interface

杀马特。学长 韩版系。学妹 提交于 2019-12-22 16:53:00
问题 What I am trying to do should be very straight forward BUT thus far has been impossible. Can someone tell me how to access a @Local Session Bean from an exposed RESTeasy interface? I have trawled the length and breadth of the internet and all I can find is variations of the same example I am trying to find out how I can access a session bean in the normal way using RESTeasy. This is what things look like so far: USING: EJB 3 RESTeasy 2.1 PUBLISHED EJB INTERFACE: @Local @Path("RequestReport")

Is it possible to disable RoleBasedSecurityFilter.java of RESTEasy?

荒凉一梦 提交于 2019-12-22 12:05:18
问题 I am developing a Web application which uses JBoss RESTEasy (resteasy-jaxrs-3.0.8) but I want to disable the RoleBasedSecurityFilter.java and only use my own custom SecurityInterceptor class (which also implements javax.ws.rs.container.ContainerRequestFilter just as the RoleBasedSecurityFilter class does, so they are both security filters). The reason for this is that line 43 in RoleBasedSecurityFilter.java calls a isUserInRole() method, which always returns false in my application. And as

JAX-RS (Resteasy 3.5.0.Final) + Wildfly 12 + Java 9 + maven = 404 not found, but JAX-RS (Resteasy 3.5.0.Final) + Wildfly 12 + Java 8 + maven works

ⅰ亾dé卋堺 提交于 2019-12-22 08:59:43
问题 I have got a simple Hello World example JAX-RS project. Really simple and stupid. Just minimal configuration, which I intend to enhance in future, just imagine something like this with : https://robferguson.org/blog/2016/12/02/getting-started-with-resteasy/ . Well, my problem is, that when I set the Java version to "1.9", I always receive a "404 not found" error. But when I change it back to 1.8, mvn clean install and deploy, it works fine. The java version is the only delta, which makes it

application/* Content-Type and charset attributes

佐手、 提交于 2019-12-22 08:44:38
问题 The RFC-2616 states in 3.7.1: When no explicit charset parameter is provided by the sender, media subtypes of the "text" type are defined to have a default charset value of "ISO-8859-1" when received via HTTP. This is why I usually use e.g. text/plain; charset=utf-8 as Content-Type Header. What about MediaTypes of type application ? I often see und use headers like Content-Type: application/xml; charset=UTF-8 . RESTeasy 2.3.7 then forces the client to also send the charset parameter in the

RestEasy Client Authentication and HTTP Put with Marshalling

两盒软妹~` 提交于 2019-12-22 08:08:40
问题 I want to test my REST-Service using the RestEasy Client Framework. In my application I am using Basic Authentication. According to the RestEasy documentation I am using the org.apache.http.impl.client.DefaultHttpClient to set the Credentials for Authentication. For an HTTP-GET Request this works fine, I am authorized and I get the result Response which I wanted. But what if I want to make a HTTP-Post/HTTP-Put with an Java Object (in XML) in the HTTP-Body of the Request? Is there a way to

RestEasy Post Process Interceptor chain not traversed when response created by ExceptionMapper

霸气de小男生 提交于 2019-12-22 05:25:49
问题 I am using RestEasy to build up my Restful web services. I have implemented ExceptionMappers to prepare specific exception responses. I have also implemented MessageBodyWriterInterceptors and a couple of PostProcessorInterceptors. Issue: All works fine when any resource does not throw any exception. My implementation works as expected. All the post processor interceptors and the message body writer interceptors are called. But when an exception is thrown from any of the resource methods, the

What is the substitue for Resteasy ProxyFactory class

不打扰是莪最后的温柔 提交于 2019-12-22 04:29:29
问题 I just realized that the ProxyFactory class is marked deprecated in RestEasy version 3.0.0. Sadly the approach that deprecates this class is not documented anywhere. I used to initialize my services this way but what is the new way? protected static final String URL = "http://localhost:12345"+"/api"; protected static final MyService myService = ProxyFactory.create(MyService.class, URL); 回答1: RESTEasy 3.0.2.Final ( http://howtodoinjava.com/2013/08/03/jax-rs-2-0-resteasy-3-0-2-final-client-api

How to delegate creation of some classes from Guice injector to another factory?

喜你入骨 提交于 2019-12-22 03:38:50
问题 For instance, RESTEasy's ResteasyWebTarget class has a method proxy(Class<T> clazz) , just like Injector's getInstance(Class<T> clazz) . Is there a way to tell Guice that creation of some classes should be delegated to some instance? My goal is the following behavior of Guice: when the injector is asked for a new instance of class A, try to instantiate it; if instantiation is impossible, ask another object (e. g. ResteasyWebTarget instance) to instantiate the class. I'd like to write a module