Microprofile client @RegisterProvider on a sub-resource
by Milan Konzal
I would like to register different Providers on different sub-resources but when I try it, it is not working (I get an exception regarding missing provider when the method on the sub-resource was called).
Is it expected? I can't find any information in the MP specification nor Resteasy documentation.
My resource proxy
@Path("/foo")
@RegisterProvider(XYZWriter.class)
@RegisterProvider(XYZReader.class)
public interface Foo {
@POST
@Consumes("xyz")
@Produces("xyz")
FooResponse get(FooContent content);
@Path("/bar")
Bar getBar();
}
My sub resource proxy
@RegisterProvider(ABCReader.class)
public interface Bar {
@POST
@Produces("abc")
BarResponse get();
}
My call
foo.getBar().get();
Only registrations on the resource proxy are done.
I'm using Resteasy 4.5.8 implementation of MP rest client.
2 months, 2 weeks
UrlInfo behind a proxy?
by Benno Fünfstück
Hello,
when running resteasy behind a reverse proxy, is there any way to
override the detected base UrlInfo? Because the address the application
is listening in this case won't match the actual public address.
Regards,
Benno
3 months
Migration difficulties from WF10/3.0.14 to WF21/3.13.1
by Christian Beikov
Hi,
I'm in the process of doing a migration but I am having some problems
and I'm not sure how to approach this.
I debugged quite far into the Resteasy JAX-RS integration and also
looked at past commits to ServerResponseWriter which is AFAICS the
source of the problem. I identified the following two commits related to
https://issues.redhat.com/browse/RESTEASY-1227 which might be the reason
for my issue:
*
https://github.com/resteasy/Resteasy/commit/992f605197c52030e88a21145e6ec...
*
https://github.com/resteasy/Resteasy/commit/fb33d3c1bac91bdb1d686008bb679...
The problem I have, is that when a HEAD request is made, which doesn't
have an Accept header, Resteasy can't figure out how to encode the
result object from my resource method. Previously, Resteasy tried to
find a MessageBodyWriter, which it now does not anymore, as it instead
throws a NotAcceptableException. As per the comment in the code, this
seems to be due to JAX-RS 2.0 section 3.8.6.
It seems that the MessageBodyWriter resolving only occurs when there is
an Accept header, which is ok if section 3.8.4 were properly respected.
It states that "If A = {}, set A {'*/*'}", which AFAICS is exactly what
is missing here. If '*/*' were added to A(note that "chosen" is set to
that value in the code), the MessageBodyWriter resolving would AFAIK
work correctly again for my case.
Is this a regression or did I misread the specification?
Regards,
Christian
3 months
jakarta.ws.rs vs javax.ws.rs
by Benno Fünfstück
Hello,
I see that resteasy uses the `javax.ws.rs` package. But the jakarta EE
jars provide `jakarta.ws.rs`. It seems that the two namespaces are not
compatible. What's the relation between them?
Best,
Benno
3 months, 1 week