Skip to content
Advertisement

Tag: jax-rs

Eclipse – Stuck “processing jax-rs changes”

I have installed Eclipse Mars2 and when I try to save changes I got a message saying “Processing JAX-RS changes… (Waiting)” and Eclipse freezes for a couple of minutes. I’m developing a spring-mvc maven based application using jboss as server (I don’t know whether this is relevant or not). In this answer a nullPointer is gotten, but I can’t see

How to create REST API with optional parameters?

I need to implement an API with these path params. Can the second and third params by optional? So the client need not pass these, but have to pass the first and last. If this is not possible, then is it recommended to rearrange the params in this way? How to provide the optional params? Answer You can match the

Java 8 LocalDate Jackson format

For java.util.Date when I do then in JSON request when I send it works. How should I do this for Java 8’s LocalDate field?? I tried having It didn’t work. Can someone please let me know what’s the right way to do this.. Below are dependencies Answer I was never able to get this to work simple using annotations. To

How to send enclose data in DELETE request in Jersey client?

I have the following server-side code in Jersey 2.x: On client side, I want to use Jersey 2.x client to send a delete request to the above web service. However, from the documentation of Jersey client API, I didn’t find how to enclose the following data in DELETE request: From the Jersey client API, the SyncInvoker class doesn’t support a

JAX-RS MessageBodyReader

I’m learning how the MessageBodyReader method works from the providers. I see the method returns an object and I’m not sure how to access the object from a service. Could I get an explanation on how to get the object returned from the reader class? This would help me apply a reading rule for all DTOs. Thanks in advance! Service:

When to use @QueryParam vs @PathParam

I am not asking the question that is already asked here: What is the difference between @PathParam and @QueryParam This is a “best practices” or convention question. When would you use @PathParam vs @QueryParam. What I can think of that the decision might be using the two to differentiate the information pattern. Let me illustrate below my LTPO – less

Advertisement