Try to force jaxrs 2 api first in the classpath Le 25 janv. 2015 00:39, "jieryn" <[email protected]> a écrit :
> embedded > > On Sat, Jan 24, 2015 at 6:22 PM, Romain Manni-Bucau > <[email protected]> wrote: > > If you use tomee remote adapter you dont need cxf 2 at all abd just need > to > > set jaxrs 2 api before javaee 6 one in your pom > > Yep, looks like it.. TomEE depends on: > > > > <cxf.version>2.6.16</cxf.version> > > > > So am I out of luck? > > > > On Sat, Jan 24, 2015 at 4:35 PM, jieryn <[email protected]> wrote: > >> Damn, spoke too soon: > >> > >> java.lang.NoSuchMethodError: > >> > > > org.apache.cxf.bus.managers.BindingFactoryManagerImpl.setMapProvider(Lorg/apache/cxf/configuration/spring/MapProvider;)V > >> at > > > org.apache.openejb.server.cxf.transport.util.CxfUtil.initDefaultBus(CxfUtil.java:88) > >> at > > > org.apache.openejb.server.cxf.transport.util.CxfUtil.<clinit>(CxfUtil.java:69) > >> at > > org.apache.openejb.server.cxf.rs.CxfRSService.init(CxfRSService.java:122) > >> at > > org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:307) > >> at org.apache.tomee.embedded.Container.start(Container.java:293) > >> at > > > org.apache.openejb.arquillian.embedded.EmbeddedTomEEContainer.start(EmbeddedTomEEContainer.java:105) > >> at > > > org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199) > >> > >> > >> Looks like a mismatch between TomEE's CXF and mine, maybe? Not sure. > >> > >> On Sat, Jan 24, 2015 at 3:56 PM, jieryn <[email protected]> wrote: > >>> It looks like: > >>> > >>> <dependency> > >>> <groupId>org.apache.cxf</groupId> > >>> <artifactId>cxf-rt-rs-client</artifactId> > >>> <version>3.0.3</version> > >>> <scope>test</scope> > >>> </dependency> > >>> > >>> does the trick, now I can > >>> javax.ws.rs.client.ClientBuilder.newClient().target(....) and have > >>> implementation agnostic JAX-RS testing. It even plays nicely with > >>> Arquillian, whereas jboss resteasy's 2.0 client didn't. > >>> > >>> THANKS > >>> > >>> > >>> On Sat, Jan 24, 2015 at 3:21 PM, Romain Manni-Bucau > >>> <[email protected]> wrote: > >>>> Hi > >>>> > >>>> > >>>> TomEE 2 already packages CXF one. > >>>> > >>>> For tests I like to use CXF client - even if not portable - cause you > >>>> can go from proxy to HTTP pretty easily and it makes code really > >>>> easier than having to stick on string (path, param name etc...). > >>>> > >>>> > >>>> > >>>> Romain Manni-Bucau > >>>> @rmannibucau > >>>> http://www.tomitribe.com > >>>> http://rmannibucau.wordpress.com > >>>> https://github.com/rmannibucau > >>>> > >>>> > >>>> 2015-01-24 21:16 GMT+01:00 jieryn <[email protected]>: > >>>>> What is the preferred Apache / Apache TomEE dependency to start using > >>>>> JAX-RS 2.0 Client API? > >>>>> > >>>>> I want to write tests using the 2.0 client code without hard > depending > >>>>> on specific implementation (currently Apache Wink). >
