Questions tagged [resteasy]

A JBoss project that provides various frameworks to help build RESTful web services and Java applications

RESTEasy is a fully certified and portable implementation of the JAX-RS specification.

JAX-RS is a new JCP specification that provides a Java API for RESTful Web Services over the HTTP protocol.

Full details are available at the JBoss RESTEasy site.

2470 questions
26
votes
4 answers

REST HTTP Authentication - How?

So, I'm developing a REST webservice using RESTeasy and Google App Engine. My question isn't related to GAE, but I mentioned it just in case it matters. It happens that naturally I need to secure my resources and my own users (not…
miguelcobain
  • 4,734
  • 4
  • 32
  • 45
26
votes
9 answers

Could not find MessageBodyWriter for response object of type: java.util.ArrayList of media type: text/html - in Resteasy

I am developing RESTEasy Example. In this example I am using all latest dependencies and deploying om tomcat 8.x version. I can successfully deploy the application but when I am launching the url:…
user4821194
26
votes
1 answer

JAX-RS 2.0 change default implementation

I'm trying to use RESTEasy as JAX-RS 2.0 client implementation. The problem is that I got runtime exception: 06-28 13:29:06.410: E/AndroidRuntime(5745): Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException:…
Konstantin Milyutin
  • 11,946
  • 11
  • 59
  • 85
25
votes
1 answer

How do I do a multipart/form file upload with jax-rs?

(specifically RESTeasy) It would be nice (for a single file) to have a method signature like: public void upload(@FormParam("name") ..., @FormParam("file") file: InputStream) ... doable? or am I dreaming? doesn't seem to be that simple.
Michael Neale
  • 19,248
  • 19
  • 77
  • 109
24
votes
5 answers

How to delete file after REST response

What is the best way to handle deleting a file after it has been returned as the response to a REST request? I have an endpoint that creates a file on request and returns it in the response. Once the response has been dispatched the file is no…
tarka
  • 5,289
  • 10
  • 51
  • 75
23
votes
5 answers

How do I get the @RolesAllowed annotation to work for my Web application?

I am making a Web application using Backbone.js, Bootstrap, NetBeans IDE 8.0, Java EE 7, JDK 8, WildFly server 8.1.0, JBoss RESTEasy (resteasy-jaxrs-3.0.8), JBoss 2.2.22, JBoss EJB 3. I am (relatively) new to Web development, and as such I have only…
PJvG
  • 1,310
  • 3
  • 16
  • 33
22
votes
3 answers

No 'Access-Control-Allow-Origin' header is present on the requested resource - Resteasy

I am working on a webapplication comprises UI-Angular , Server-Java , RestEasy 3.0.9.Final for rest api calls When i tried to access the rest service from another domain am getting below error CANNOT LOAD Response to preflight request doesn't pass…
PremKumarR
  • 461
  • 1
  • 6
  • 19
22
votes
2 answers

HTTP Status 415 - Cannot consume content type

POST operation to the REST service with JSON body returning org.jboss.resteasy.spi.UnsupportedMediaTypeException : Cannot consume content type exception Both @Consumes(MediaType.APPLICATION_JSON) and @Consumes("application/json") returned same…
AvenashKrish
  • 343
  • 2
  • 6
  • 20
22
votes
7 answers

Netty based non-blocking REST framework

I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking…
Vaibhav Raj
  • 2,214
  • 4
  • 23
  • 39
22
votes
8 answers

Unable to find a MessageBodyReader of content-type application/json and type class java.lang.String

I am using RestEasy client with jackson providers and getting the above error clientside code is: ClientRequest request = new ClientRequest(url); request.accept(MediaType.APPLICATION_JSON); ClientResponse response =…
user1632803
  • 301
  • 1
  • 3
  • 5
21
votes
4 answers

Reusing JAX RS Client in multi-threaded environment (with resteasy)

According to the documentation, "Clients are heavy-weight objects that manage the client-side communication infrastructure. Initialization as well as disposal of a Client instance may be a rather expensive operation. It is therefore advised…
Alexandr
  • 9,213
  • 12
  • 62
  • 102
21
votes
1 answer

What is JAXB and JAXRS ? How are they related?

Sorry for this blunt question . But many use these 2 terms day in and day out yet I don't know .I did some study on this and knew what it is separately . But don't understand how it is related . I will share what I understood about these two first…
Harish Kayarohanam
  • 3,886
  • 4
  • 31
  • 55
21
votes
4 answers

Serialize Date in a JSON REST web service as ISO-8601 string

I have a JAX-RS application using JBoss AS 7.1, and I POST/GET JSON and XML objects which include Dates (java.util.Date): @XmlRootElement @XmlAccessorType(XmlAccessField.FIELD) public class MyObject implements Serializable { @XmlSchemaType(name…
Zlika
  • 331
  • 1
  • 4
  • 10
19
votes
4 answers

How to set HTTP header in RESTEasy client framework?

RESTEasy (a JAX-RS implementation) has a nice client framework, eg: RegisterBuiltin.register(ResteasyProviderFactory.getInstance()); SimpleClient client = ProxyFactory.create(SimpleClient.class, "http://localhost:8081"); client.putBasic("hello…
Lukasz R.
  • 2,265
  • 1
  • 24
  • 22
19
votes
1 answer

HTTP 500 Response with Body?

I have a RESTEasy service that returns a HTTP 500 when a server side error occurs. I manage to attach a body to the HTTP response in order to give more details about the error. So the response that comes out of the service looks something like this…
pastafarian
  • 1,010
  • 3
  • 16
  • 30