Le 4 déc. 2017 02:16, "John D. Ament" <[email protected]> a écrit :
The problem I see has to do with how the ResponseExceptionMapper works. JAX-RS doesn't define this provider, however the MP Rest Client does, and CXF also has this type of provider. The handling of this provider is in two places, ClientProxyImpl and ClientProviderFactory. We'd have to create sublcasses of these to handle the MicroProfile specific cases. FWIW, the API JAR is only 12kb. I'm not sure it could be optional, since I was planning to make the CXF interface extend the MP interface (ResponseExceptionMapper). Hmm, with config api it is more and even if size is small, it can conflict. What is impacting also is the cdi extension which can conflict as well - cxf client being widely used. All can be optional and I think it is not bad as solution but if enforced, another module is better IMHO. John On Sun, Dec 3, 2017 at 5:40 PM Andriy Redko <[email protected]> wrote: > Hey John, > > That would be an interesting feature, useful even beyond just Microprofile > actually (imho) :) > Should we have a dedicated module for it instead of using the client one? > We would > have the dependency to Microprofile REST Client SPI/API there, may be it > is better > not to introduce it into the existing client module (even as an optional)? > > Best Regards, > Andriy Redko > > JDA> Hey all > > JDA> Andy (McCright) and I (as well as some others who don't contribute to > CXF) > JDA> have been working on another project, specifically around > standardizing how > JDA> Type Safe rest clients can be built within MIcroProfile. There's two > main > JDA> aspects to this, as well as some changes potentially required for a > JDA> presently CXF specific provider. > > JDA> - Programmatic builder API for creating the clients from a JAX-RS > annotated > JDA> interface > JDA> - CDI injection support for interfaces > > JDA> I have most of an implementation for this working, and would like to > start > JDA> to bring it into the CXF codebase. My thought is to bring most of it > JDA> directly into the client module, and update some of the core logic > there to > JDA> work with MicroProfile's APIs. There are some functional differences > JDA> though. One of the things we felt was important was mapping Response > codes > JDA> into Exceptions, something that CXF already had support for. The > behavior > JDA> is a little different in that we will evaluate multiple mappers as > well as > JDA> handle any response code. > > JDA> You can read more about the API and specification at > JDA> https://github.com/eclipse/microprofile-rest-client > JDA> You can also see the base impl I've started on at > JDA> https://github.com/johnament/cxfmprestclient > > > JDA> John > >
