resteasy

RESTEasy, CDI, embedded Jetty, bean validation is ignored

喜你入骨 提交于 2020-01-24 01:04:07
问题 I've a Groovy project where I use RESTEasy with Weld and deploy to embedded Jetty. What I can't seem to get working is bean validation. RESTEasy documentation says that adding resteasy-validator-provider-11 along with hibernate validator dependencies ( hibernate-validator, hibernate-validator-cdi, javax.el-api, javax.el ) is enough. But the bean validation is simply ignored by RESTEasy. I curiously also get the following message in the logs: plugins.validation.ValidatorContextResolver -

Is a project with Jersey 2.x AND RESTEasy dependencies possible?

≡放荡痞女 提交于 2020-01-23 08:47:27
问题 I'm working on a project which uses various client apps as maven dependencies to talk to different REST APIs. But there's a problem when including a client which is implemented using Jersey 2.x and any other client which is using RESTEasy. As soon as I add the dependency which is using RESTEasy I'll get errors like this: Caused by: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type application/json and type class de.fhg.ipa.vfk.docker.dockerregistry.restclient

How to get text/xml as UTF-8 from a multipart/form-data request with RESTeasy?

我与影子孤独终老i 提交于 2020-01-21 23:52:47
问题 thanks for your answer, but using an InputStream instead of using getBody(...) does also not work. The code below returns the same result as the one from my original post. final InputStream inStream = fileUploadInput.getFormDataPart(searchedInput, InputStream.class, null); // get bytes final byte[] inBytes = new byte[1024]; final ByteArrayOutputStream outBytes = new ByteArrayOutputStream(inBytes.length); int length = 0; while((length = inStream.read(inBytes)) >= 0) { outBytes.write(inBytes, 0

Passing indefinite Query Parameters with RESTful URL and reading them in RESTEasy

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-21 08:32:28
问题 I have a requirement to design a RESTful Service using RESTEasy. Clients can call this common service with any number of Query Parameters they would want to. My REST code should be able to read these Query Params in some way. For example if I have a book search service, clients can make the following calls. http://domain.com/context/rest/books/searchBook?bookName=someBookName http://domain.com/context/rest/books/searchBook?authorName=someAuthor& pubName=somePublisher http://domain.com/context

Passing indefinite Query Parameters with RESTful URL and reading them in RESTEasy

丶灬走出姿态 提交于 2020-01-21 08:32:27
问题 I have a requirement to design a RESTful Service using RESTEasy. Clients can call this common service with any number of Query Parameters they would want to. My REST code should be able to read these Query Params in some way. For example if I have a book search service, clients can make the following calls. http://domain.com/context/rest/books/searchBook?bookName=someBookName http://domain.com/context/rest/books/searchBook?authorName=someAuthor& pubName=somePublisher http://domain.com/context

JBoss resteasy - Custom Jackson provider

大兔子大兔子 提交于 2020-01-19 18:04:07
问题 I am using JBoss resteasy in my Spring boot application. Have configured with my custom JasonProvider like below and using com.fasterxml.jackson. @Provider @Priority(value=1) @Consumes({ "application/*+json", "text/json" }) @Produces({ "application/*+json", "text/json" }) public class JsonProvider extends JacksonJsonProvider { public static final PeriodFormatter STANDARD_ISO_PERIOD_FORMAT = ISOPeriodFormat.standard(); public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper()

JBoss resteasy - Custom Jackson provider

会有一股神秘感。 提交于 2020-01-19 18:03:48
问题 I am using JBoss resteasy in my Spring boot application. Have configured with my custom JasonProvider like below and using com.fasterxml.jackson. @Provider @Priority(value=1) @Consumes({ "application/*+json", "text/json" }) @Produces({ "application/*+json", "text/json" }) public class JsonProvider extends JacksonJsonProvider { public static final PeriodFormatter STANDARD_ISO_PERIOD_FORMAT = ISOPeriodFormat.standard(); public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper()

how to log resteasy client request

﹥>﹥吖頭↗ 提交于 2020-01-17 04:18:18
问题 I need to know what is exactly the REST message body before sending it to client and also its response before processing, so I try to use Interceptors but unfortunately it is NOT working. @NameBinding public @interface DoIt {} @DoIt public class MyFilter implements ContainerRequestFilter {...} @Path("/root") public class MyResource { @GET @DoIt public String get() {...} } I can not use wireshark to capture http messages because my server only accept Https requests. I searched a lot and find

Using JAX-RS (RESTEasy) as middleware: brokering a client's request to another server

强颜欢笑 提交于 2020-01-15 15:13:10
问题 I'm building a server using JAX-RS (RESTEasy) that will provide a REST interface to clients. The server will act as a broker between the client and another server. The other server, a 3rd-party server (JasperReports), also has a REST interface. I'd like to use JAX-RS to have my broker talk to that server. (My broker server adds authentication and other services.) So, there you have the three parties: client, broker-server, reports-server. I see the workflow this way. The broker-server

Using JAX-RS (RESTEasy) as middleware: brokering a client's request to another server

帅比萌擦擦* 提交于 2020-01-15 15:12:46
问题 I'm building a server using JAX-RS (RESTEasy) that will provide a REST interface to clients. The server will act as a broker between the client and another server. The other server, a 3rd-party server (JasperReports), also has a REST interface. I'd like to use JAX-RS to have my broker talk to that server. (My broker server adds authentication and other services.) So, there you have the three parties: client, broker-server, reports-server. I see the workflow this way. The broker-server