resteasy

What could be a reason of a big lag between exit from RESTeasy controller and enter into MainFilter

I have EJB RESTEasy controller with CMT. One critical method which creates some entities in DB works fine and quickly on single invocation. But when i try to invoke it simultaneously by 10 users it works very slowly. I've tracked time in logs and the most expanded place vs. single invocation is lag between exit from RESTeasy controll...

Seam RestEasy Webservices are not Working when Application is configured for Seam JBPM

Hi All, I have a Requirement for JBPM. so i included JBPM Configuration in the web.xml and done all the necessary changes. because of this the Existing RestEasy services in the Application are not running.if i comment the JBPM configuraiton in Web,xml RestEasy services are working. i couldn't figure out the Problem. please help me on th...

Getting error when submitting form using SpringMVC and REST

Hello there, Created an online form in JSP using SpringMVC tag libraries. The controller for my form is a RESTful web service. The RESTful web service has two calls: (1) http://localhost:8080/myapp/applications/new This brings up the online form in the browser (this works). (2) http://localhost:8080/myapp/applications/create This ...

REST + json + JAXB + namespaces

I have been trying to wrap my head around POSTing json to a REST service and JAXB namespaces. I am using Resteasy to mark up the server side method. I have the following service: @POST @Mapped(namespaceMap={@XmlNsMap(namespace="http://acme.com", jsonName="")) @Path("/search") @Consumes("application/json") public List<I> search(SearchC...

How is dispatching controlled in JAX-RS?

I'm writing a RESTful Web Service with RESTeasy. This is an implementation of JAX-RS. You annotate a class or method with a single @Path annotation. Regular expressions are used to get path parameters. For instance @Path("/foo{varname:.*}/bar") matches all patterns starting with "/foo", ending with "/bar" and having anything in be...

JAX-RS interface markup and @Context injection

Consider the following simple RESTEasy (JAX-RS) service: @Path("/example-service") public interface ExampleService { @Path("/ping") @GET public String ping(String message); } I want to define JAXRS specifics on the interface rather than the class so I can use the nice client framework, ie: ExampleService client = ProxyF...

How to develop authentication with resteasy?

I'm making small web service(1) and I decided to use resteasy to make it. But I need to know what would be best practise to develop authentication with resteasy. And what kind of responses webservice should send? Are responses usually in XML or what format, and what format of XML response should be? Btw. I use jboss 4 and Java 5. http...

Using Resteasy with javassist?

I'm trying to use resteasy to serve out some entities fetched by spring-hibernate. I've configured one method which returns a POJO and works as expected: @GET @Path("/test") @Produces(MediaType.APPLICATION_XML) public Episode getTestEpisode() { Episode e = new Episode(); e.setEpisodename("test"); return e; } Produces: <episod...

NPE when POSTing Binary data to RESTEasy Service

My environment is JBOSS AS 5.1.0-GA, Struts 2.1.8 and RESTEasy 1.2.GA When posting to my service I get a NPE on the Block getter which is being called from the @Consumes annotation. I'm some what at a loss as to what it could be and any help would be greatly appreciated. Thank you in advance. Jono public class MyForm { @FormP...

RESTEasy client framework authentication credentials

RESTEasy (a JAX-RS implementation) has a nice client framework, eg: ServiceApi client = ProxyFactory.create(ServiceApi.class, baseUri); How do you provide HTTP authentication credentials to this client? ...

Resteasy client in an OSGi / Eclipse RCP environment

I'm trying to build a client for a Resteasy service in Eclipse. I thought this would be simple - but a lot of the magic that Resteasy does (e.g. looking up annotations on POJOs, loading the Resteasy providers, etc.) seems to be broken by the OSGi class loader. I've spent quite a bit of time resolving the problems with dependencies and bu...

Setting Jersey to allow caching?

I have the following returned from a Jersey @GET method. It works, fine but always includes the No-cache header. I'd like to allow the client to cache this data since it rarely changes. ResponseBuilder rb = Response.ok(c); CacheControl cc = new CacheControl(); cc.setMaxAge(60); cc.setNoCache(false); return rb.cacheContro...

Why are error pages ignored in RESTEasy web service running on Tomcat?

I'm developing a REST-ful web service using RESTEasy deployed on Tomcat. I've configured an error page which takes the exception's message and generates an XML based on it when any exception occurs during the request. This works fine for any application generated exceptions. However, if client sends an invalid XML which cannot be unma...

JBoss RESTEasy - show ALL path mappings

Is there any way to dump out a list of mapped paths in RESTEasy? I've searched the documentation and came up empty. ...

unable to find a MessageBodyReader

Hi guys, I have this interface: @Path("inbox") public interface InboxQueryResourceTest { @POST @Path("{membershipExternalId}/query") @Consumes(MediaType.APPLICATION_XML) @Produces("multipart/mixed") public MultipartOutput query(@PathParam("membershipExternalId") final String membershipExternalId, ...

Looking for an example of a web application which provides and uses a JAX-RS web service for "all" logic.

I am looking for a good example of an open source web application that provides and uses a JAX-RS web service for all business logic calls. That is an application that doesn't only provide a RESTful interface for some parts of the system but also uses the same interface within the application. ...

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. ...

RESTEasy - access to web folder for geting image

I would like to allow users to access images saved in web folder. For example - I have an image in web root folder "blank.png". But the link http://localhost:8080/myapp/blank.png returns 404 (not found). Adding type to resteasy.media.type.mappings does not work. I am a bit of a newbie in RESTEasy... ...

RESTEasy - simple string array/collection marshalling

Is there a simple way for marshalling and unmarshalling String[] or List in RESTEasy? My code sample : @GET @Path("/getSomething") @Produces(MediaType.APPLICATION_JSON) public List<String> getSomeData() { return Arrays.asList("a","b","c","d"); } Above gives me an Exception : Could not find MessageBodyWriter for response object...

How to use RESTEasy client framework to send data in a POST

I am using the RESTEasy client framework to call a RESTful webservice. The call is made via a POST and sends some XML data to the server. How do I accomplish this? What is the magical incantation of annotations to use to make this happen? ...