Hi,

great it's all working now :-)

I believe in CXF 2.1.x it does not matter which pattern is used by CXF servlet as it's always an HttpServletRequest's path info is used to match requests. So it's the combination of <jaxrs:server adress="..."> and Path's value on a root resorce class or any of its methods which is taken into account.

So, in 2.1.3,  if you have /v1/* in cxf servlet then for /v1/x be handled by 
your class you can have for ex
<jaxrs:server adress="/"> and either Path("/") on a root resource class with Path("/x") on one of the methods or Path("/x") only on the root resource class. Or you can have <jaxrs:server adress="/x"> with Path("/") on a root resource class.

in 2.2-SNAPSHOT the situation is different (and in 2.1.4-SNAPSHOT), as it's an HttpServletRequest's Request URI which is used as it's not been uri-decoded yet and thus it the only option really for requests with encoded URIs be supported. RequestURI includes the path segmnets(s) if any specified by CXF servlet, so if you do want to have a servlet address orther than "/*" then the only option at the moment is to update your root resource class's PATH value to match the request.

So, in 2.2-SNAPSHOT,  if you have /v1/* in cxf servlet then for /v1/x be 
delivered to your class it should be

<jaxrs:server adress="/">
and either Path("/") - with /v1/x bit to be handled by some method or Path("/v1") with /x bit be handled by some method or Path("/v1/x")

I'm thinking of adding an attribute to jaxrs:server which would let one to keep 
say 'v1' bit out of the class resource, see
https://issues.apache.org/jira/browse/CXF-1925

I know it all has to be documented - just can't find time at the minute. Let me know if you have any problems with matching requests.

Hope it helps. Sergey

----- Original Message ----- From: "Piotr Skawinski" <[EMAIL PROTECTED]>
To: "cxf users mailing list" <[email protected]>
Sent: Thursday, November 27, 2008 6:31 PM
Subject: RE: Problem of having jax-rs based services together with jax-ws based 
clients




OK, thanks a lot, it helped and it finally works -:)

I have just one question. Is address in the <jaxrs:server adress="..."> 
relative to the path defined for the CXFServlet in the
web.xml?
If I have CXFSerlvet url-pattern defined as /v1/* how should I then define 
adress in the jaxrs:server to map my jaxrs service to
/v1/x/? In the web.xml I have other servlets, so I dont want url-pattern be /*.

Piotr


From: [EMAIL PROTECTED]
To: [email protected]
Subject: Re: Problem of having jax-rs based services together with jax-ws based 
clients
Date: Thu, 27 Nov 2008 15:48:12 +0000

Hi Piotr

I think the reason you might want to use cglib-nodeps in that it has no 
dependencies on asm and it should work ok with hibernate
for
ex. It's a common advice which I can read on cxf user list or elsewhere. That's 
as far as I know about it :-). I'd not be
surprised
if this info is available on CXF docs somewhere - but if not then it would help 
to all if it were added there

Cheers, Sergey



----- Original Message ----- From: "Piotr Skawinski" <[EMAIL PROTECTED]>
To: "cxf users mailing list" <[email protected]>
Sent: Thursday, November 27, 2008 3:39 PM
Subject: RE: Problem of having jax-rs based services together with jax-ws based 
clients





Hi Sergey,

I think the problem now lies in the artifact versions that cxf is using and the 
versions that 3'rd part libriaries of my
application
are using. What I can see is that all cxf.version from 2.1 are using 2.2.3 
version of asm and the 3'rd part libriaries I'm using
(like hibernate, cglib, etc) is expecting to version 1.5.3. Has it been 
anounced which artifact to upgrade (within custom
applications) to get cxf (version>2.1) up and running?

Piotr

> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: Problem of having jax-rs based services together with jax-ws 
based clients
> Date: Thu, 27 Nov 2008 14:49:09 +0000
>
> Hi Piotr
>
> I'm sorry I didn't get earlier to you - and I'm happy you've found what looks 
like the way forward.
> I was about to spend a bit of time today on your issue now that I've mostly 
finished with some of the other pending work.
>
> >     <import 
resource="classpath:/arena.cs.images/images-service-implementation.context"/>
> >     <import 
resource="classpath:/arena.cs.images/images-store-connector.context"/>
>
> Does it make any difference if you just change the order of imports, jaxws 
client configuration goes first, jaxrs one goes
> second
> ?
>
>     <import 
resource="classpath:/arena.cs.images/images-store-connector.context"/>
>     <import 
resource="classpath:/arena.cs.images/images-service-implementation.context"/>
>
> Cheers, Sergey
>
>
> ----- Original Message ----- > From: "Piotr Skawinski" <[EMAIL PROTECTED]>
> To: "cxf users mailing list" <[email protected]>
> Sent: Thursday, November 27, 2008 2:27 PM
> Subject: RE: Problem of having jax-rs based services together with jax-ws 
based clients
>
>
>
>
>
> It seems that the error get removed after putting <import 
resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> in the
> jaxrs:server configuration, but then I faces missing classes as I get the 
error below. It seems that cxf is using lower/higher
> version of some artifact than the rest of my application? When I remove the 
dependencies to my store (implemented using
> hibernate)
> the application runs fine. I'm using cxf.version 2.2-SNAPSHOT to get it 
running with the latest jax-rs (1.0).
>
> Any suggestion what to upgrade in my application?
>
> regards, Piotr
>
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class 
net.sf.cglib.proxy.Enhancer
>     at 
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
>     at 
org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>     at 
org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
>     at 
org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
>     at 
org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
>     at 
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
>     at 
org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
>     at 
org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
>     at 
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
>     at 
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
>     at 
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
>     at 
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
>     at 
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
>     at 
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
>     at 
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>     at
> 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>     at
> 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>     at
> 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>     at
> 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>     at
> 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
>     at
> 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:132)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
>     at
> 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>     at
> 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>     at
> 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
>     at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>     at 
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
>     at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
>     at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
>     at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
>     at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
>     at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
>     at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
>     at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
>     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
>     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
>     at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
>     at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>     at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>     at 
org.apache.catalina.core.StandardService.start(StandardService.java:516)
>     at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>     at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>
> > From: [EMAIL PROTECTED]
> > To: [email protected]
> > Subject: Re: Problem of having jax-rs based services together with jax-ws 
based clients
> > Date: Wed, 26 Nov 2008 12:31:02 +0000
> >
> > Thanks, I'll have a look...
> >
> > ----- Original Message ----- > > From: "Piotr Skawinski" <[EMAIL PROTECTED]>
> > To: "cxf users mailing list" <[email protected]>
> > Sent: Wednesday, November 26, 2008 12:21 PM
> > Subject: RE: Problem of having jax-rs based services together with jax-ws 
based clients
> >
> >
> >
> > Yes, I have seperate configuration files. One for services and one for 
store. Configuration files are merged into one
> > configuration
> > file like:
> >
> > <?xml version="1.0"?>
> > <beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xsi:schemaLocation="
> > http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
> >
> >     <import 
resource="classpath:/arena.cs.images/images-service-implementation.context"/>
> >     <import 
resource="classpath:/arena.cs.images/images-store-connector.context"/>
> >
> > </beans>
> >
> > which is loaded by the CXFServlet as described in the web.xml.
> >
> > As I said it works fine when services are implemented using the restlet 
framework, but I would like to change to the JAX-RS
> > implementation as CXF offers.
> >
> >
> > > From: [EMAIL PROTECTED]
> > > To: [email protected]
> > > Subject: Re: Problem of having jax-rs based services together with jax-ws 
based clients
> > > Date: Wed, 26 Nov 2008 12:05:17 +0000
> > >
> > > So you have seperate configuration files, right ? In what order they're 
loaded or how do you access them ?
> > > I didn't know multiple config files were possible...
> > >
> > > Cheers, Sergey
> > >
> > >
> > >
> > > jaxws client configuration
> > > ------------------------------
> > >
> > > <?xml version="1.0"?>
> > > <beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >        xsi:schemaLocation="
> > > http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
> > >
> > >     <bean id="fedoraServiceConnector" 
class="com.axiell.arena.fedora.service.FedoraServiceConnector">
> > >     </bean>
> > > </beans>
> > >
> > > client implementation
> > >
> > > --------------------
> > >
> > > public class FedoraServiceConnector implements FedoraService {
> > >
> > >     private FedoraAPIA fedoraAPIA;
> > >     private FedoraAPIM fedoraAPIM;
> > >
> > >     public FedoraServiceConnector() {
> > >         fedoraAPIA = new 
FedoraAPIAService().getFedoraAPIAServiceHTTPPort();
> > >         BindingProvider apiabindingProvider = (BindingProvider) 
fedoraAPIA;
> > >         
apiabindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, 
"fedoraAdmin");
> > >         
apiabindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, 
"fedoraAdmin");
> > >
> > >         fedoraAPIM = new 
FedoraAPIMService().getFedoraAPIMServiceHTTPPort();
> > >         BindingProvider apimbindingProvider = (BindingProvider) 
fedoraAPIM;
> > >         
apimbindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, 
"fedoraAdmin");
> > >         
apimbindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, 
"fedoraAdmin");
> > >     }
> > >     .
> > >     .
> > >     .
> > > }
> > >
> > > FedoraAPIAService, FedoraAPIA, FedoraAPIMService and FedoraAPIM are 
generated client classes using the cxf plugin for maven
> > > for
> > > generating ws clients.
> > >
> > >
> > > sample jaxrs server configuration
> > > -------------------------------
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <beans xmlns="http://www.springframework.org/schema/beans";
> > >   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >   xmlns:jaxrs="http://cxf.apache.org/jaxrs";
> > >   xsi:schemaLocation="
> > > http://www.springframework.org/schema/beans
> > > http://www.springframework.org/schema/beans/spring-beans.xsd
> > > http://cxf.apache.org/jaxrs
> > > http://cxf.apache.org/schemas/jaxrs.xsd";>
> > >
> > >   <import resource="classpath:META-INF/cxf/cxf.xml" />
> > >   <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" 
/>
> > >   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> > >
> > >   <jaxrs:server id="imageService" address="/">
> > >     <jaxrs:serviceBeans>
> > >       <ref bean="imagesServiceImpl" />
> > >     </jaxrs:serviceBeans>
> > >   </jaxrs:server>
> > >
> > >   <bean id="imagesServiceImpl" 
class="com.axiell.arena.services.images.service.implementation.ImagesServiceImpl">
> > >           <property name="imagesStore" ref="imagesStoreConnector"/>
> > >   </bean>
> > >
> > > </beans>
> > >
> > > jaxrs service implementation
> > > ---------------------------
> > > @Path("/images")
> > > @Produces("application/xml")
> > > public class ImagesServiceImpl {
> > >
> > >     private Logger logger = Logger.getLogger(ImagesServiceImpl.class);
> > >     private ImagesStore imagesStore;
> > >
> > >     @POST
> > >     @Path("/image")
> > >     public ImageDTO createImage(ImageDTO imageDTO) {
> > >         logger.debug("ImagesServiceImpl.createImage");
> > >         try {
> > >             logger.debug("ImagesServiceImpl.createImage");
> > >             Image image = ImagesConverter.convertImageFromDTO(imageDTO);
> > >             image = imagesStore.createImage(image);
> > >             return ImagesConverter.convertImage(image);
> > >         } catch (ParseException e) {
> > >             throw new WebApplicationException(e);
> > >         }
> > >     }
> > >
> > >     @GET
> > >     @Path("/image/{imageId}")
> > >     public ImageDTO getImage(@PathParam("imageId") final String id) {
> > >         logger.debug("ImagesServiceImpl.getImage");
> > >         Image.Id imageId = new Image.Id(new Uberkey() {
> > >             {
> > >                 setUuid(new Uuid(id));
> > >             }
> > >         });
> > >         Image image = imagesStore.getImage(imageId);
> > >         return ImagesConverter.convertImage(image);
> > >     }
> > >
> > >     @GET
> > >     public ImagesDTO getAllImages() {
> > >         logger.debug("ImagesServiceImpl.getAllImages");
> > >         List<Image> images = imagesStore.getAllImages();
> > >         return ImagesConverter.convertImages(images);
> > >     }
> > >
> > >     public void setImagesStore(ImagesStore imagesStore) {
> > >         this.imagesStore = imagesStore;
> > >     }
> > >
> > > }
> > >
> > >
> > > web.xml
> > > --------
> > > <?xml version="1.0"?>
> > > <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
> > >
> > >     <context-param>
> > >         <param-name>contextConfigLocation</param-name>
> > >         
<param-value>classpath:/arena.cs.images/arena.cs.images.context</param-value>
> > >     </context-param>
> > >
> > >     <listener>
> > >         <listener-class>
> > >             org.springframework.web.context.ContextLoaderListener
> > >         </listener-class>
> > >     </listener>
> > >
> > >     <servlet>
> > >         <servlet-name>CXFServlet</servlet-name>
> > >         <servlet-class>
> > >             org.apache.cxf.transport.servlet.CXFServlet
> > >         </servlet-class>
> > >         <load-on-startup>1</load-on-startup>
> > >     </servlet>
> > >
> > >     <servlet-mapping>
> > >         <servlet-name>CXFServlet</servlet-name>
> > >         <url-pattern>/*</url-pattern>
> > >     </servlet-mapping>
> > >
> > > </web-app>
> > >
> > >
> > >
> > >
> > >
> > > > From: [EMAIL PROTECTED]
> > > > To: [email protected]
> > > > Subject: Re: Problem of having jax-rs based services together with 
jax-ws based clients
> > > > Date: Wed, 26 Nov 2008 11:30:29 +0000
> > > >
> > > > Hi
> > > >
> > > > Can you please post
> > > >
> > > > - sample jaxws client configuration
> > > > - sample jaxws server configuration if any
> > > > - sample jaxrs server configuration
> > > > - sample jaxws and jaxrs code you use
> > > >
> > > > It will make it easier to investigate the problem
> > > >
> > > > Cheers, Sergey
> > > >
> > > > ----- Original Message ----- > > > > From: "Piotr Skawinski" <[EMAIL PROTECTED]>
> > > > To: "cxf users mailing list" <[email protected]>
> > > > Sent: Wednesday, November 26, 2008 11:15 AM
> > > > Subject: Problem of having jax-rs based services together with jax-ws 
based clients
> > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I'm facing a problem of deploying jax-rs based services together with 
jax-ws based client. I get below exception when the
> > > > client
> > > > is
> > > > tried to be initilized. Both, the jax-rs based services and jax-ws 
based client are implemented
> > > > using the cxf. The problem seem not to occur when services are
> > > > implemented using the restlet framework, or when jax-rs based services 
are
> > > > deployed without the jax-ws based client. Is there a conflict of
> > > > having the jax-rs services together with jax-ws clients, both
> > > > implemented using the cxf?
> > > >
> > > > Caused by: javax.xml.ws.WebServiceException: 
org.apache.cxf.service.factory.ServiceConstructionException
> > > >     at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:314)
> > > >     at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
> > > >     at javax.xml.ws.Service.getPort(Service.java:92)
> > > >     at 
info.fedora.definitions._1._0.api.FedoraAPIAService.getFedoraAPIAServiceHTTPPort(FedoraAPIAService.java:62)
> > > >     at 
com.axiell.arena.fedora.service.FedoraServiceConnector.<init>(FedoraServiceConnector.java:33)
> > > >     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
> > > >     at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> > > >     at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> > > >     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> > > >     at 
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
> > > >     ... 83 more
> > > > Caused by: org.apache.cxf.service.factory.ServiceConstructionException
> > > >     at 
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:59)
> > > >     at 
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
> > > >     at 
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
> > > >     at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
> > > >     at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
> > > >     ... 92 more
> > > > Caused by: org.apache.cxf.BusException: No binding factory for 
namespace http://schemas.xmlsoap.org/wsdl/soap/ registered.
> > > >     at 
org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:91)
> > > >     at 
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:114)
> > > >     at 
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
> > > >     ... 96 more
> > > >
> > > >
> > > > thx in advance, Piotr
> > > >
> > > >
> > > >
> > > >
> > > > _________________________________________________________________
> > > > Connect to the next generation of MSN Messenger
> > > > 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
> > > >
> > > >
> > >
> > > _________________________________________________________________
> > > Explore the seven wonders of the world
> > > http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
> > >
> > >
> >
> > _________________________________________________________________
> > Discover the new Windows Vista
> > http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
> >
> >
>
> _________________________________________________________________
> Explore the seven wonders of the world
> http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
>
>

_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us



_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE

Reply via email to