2

is it possible to use a CXF ResourceComparator in OpenLiberty or WASLiberty?

http://cxf.apache.org/docs/jax-rs-basics.html#JAX-RSBasics-Customselectionbetweenmultipleresourcesoroperations

Must the cxf dependencies be supplied in the WEB-INF/lib or is enough to modify the apiVisibility of the app? And how can be declared to CXF? with a cxf.xml?

TIA PacoG

PacoG
  • 101
  • 1
  • 4

1 Answers1

4

There are multiple ways to use CXF in OpenLiberty/WebSphere Liberty: * You can use the built-in jaxrs-2.0 feature, or * You can package the CXF modules you need with your app (or in a shared library associated with your app)

If you use the first approach (jaxrs-2.0 feature), then you will only have the JAX-RS 2.0 APIs available - which does not include CXF ResourceComparators. There are a few IBM-specific APIs that go above and beyond the spec (for example, integration with CDI, security, attachment processing, etc.) - you can find more information on those APIs at: https://www.ibm.com/support/knowledgecenter/en/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/twlp_dep_jaxrs.html

If you use the second approach, then you have the full feature set of the CXF modules in your application, but they will not be fully integrated with other Liberty features like the jaxrs-2.0 feature is. For usage instructions, I would suggest the Apache CXF documentation - like the page you referenced in the initial question.

Hope this helps, Andy

Andy McCright
  • 1,273
  • 6
  • 8
  • Thanks. But then, that is all of nothing: or "naked" JAX-RS or you are alone. There is no extension points for this kind of thigs. Is any IBM Api (liberty or WAS) available for do what I need (in fact this is a usual need): to choose the resource mapped when ambiguos. Thanks – PacoG Mar 12 '18 at 16:51
  • It is possible to use some of the features of CXF with liberty according with this: https://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/rwlp_jaxrs2.0_atom.html "Apache CXF offers you other ways of integrating JAX-RS 2.0 with Atom. For more information, see https://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-Atom." Why not a simple ResourceComparator Hook? – PacoG Mar 12 '18 at 16:57