Hi!
I think you've made a mistake : the e-mail you respond below is an old
one! And we have talked many times since I sent it. ;-)
There is no more problem for me using jax-rs at the moment.
Bye,
Priscille.
> Hi,
>
> Do you have a root Path annotation ("Admin") ?
> So the jax-rs endpoint address '/' should combine with this root path
> value and the method one. I'll be offline for the rest of this day - so
> won't be able to help more today, sorry :-)
>
> Cheers, Sergey
>
> -----Original Message-----
> From: Priscille Durville [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2008 10:58
> To: [email protected]
> Subject: error while invoking jax-rs web services
>
> Hi!
> I'm trying to develop RESTful web services with CXF version 2.1.1 using
> the jax-rs style.
>
> 1/ I've created a java interface (my.package.AdminService) that
> describes the service and got the annotations following the example
> given there : http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html
> Declaring : @Path("/rest/Admin/") on the interface and with a method
> like this :
> @GET
> @Path("/validity/{engine-key}")
> public boolean isValidEngineID(@PathParam("engine-key") Long engineID);
>
> I've created a class (my.package.AdminServiceImpl) that implements this
> interface.
> Note that my java interface has annotations relative to soap
> configuration too because I want my service to be accessible both in a
> soap or REST way.
> And, for now, I use it in a soap way and it works perfectly. :-)
>
> 2/ In order to build my webapp, I use Maven2 and I've declared the
> following CXF dependencies :
>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-core</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-simple</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-jaxws</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-jaxrs</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-databinding-aegis</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-transports-local</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-transports-http</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-transports-jms</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-management</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-common-utilities</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>javax.ws.rs</groupId>
> <artifactId>jsr311-api</artifactId>
> <version>${jsr311.version}</version>
> </dependency>
> <dependency>
> <groupId>ws-commons</groupId>
> <artifactId>axiom</artifactId>
> <version>1.1.1</version>
> </dependency>
> <dependency>
> <groupId>org.apache.abdera</groupId>
> <artifactId>abdera-client</artifactId>
> <version>0.4.0-incubating</version>
> </dependency>
> <dependency>
> <groupId>org.apache.abdera</groupId>
> <artifactId>abdera-server</artifactId>
> <version>0.4.0-incubating</version>
> </dependency>
> <dependency>
> <groupId>org.apache.abdera</groupId>
> <artifactId>abdera-spring</artifactId>
> <version>0.4.0-incubating</version>
> </dependency>
>
> 3/ In order to deploy the service, I use a Spring configuration file
> beans.xml that contains both declarations (for soap and Rest) :
>
> <jaxws:endpoint
> id="admin"
> implementor="my.package.AdminServiceImpl"
> address="/Admin" />
>
> <jaxrs:server id="restfulAminService" address="/">
> <jaxrs:serviceBeans>
> <ref bean="RestAminService" />
> </jaxrs:serviceBeans>
> </jaxrs:server>
> <bean id="RestAminService" class="my.package.AdminServiceImpl" />
>
> 4/ While deploying on Tomcat 6 server, it seems to be ok :
> 15 oct. 2008 11:52:59 org.apache.cxf.endpoint.ServerImpl initDestination
> INFO: Setting the server's publish address to be /
> 15 oct. 2008 11:52:59 org.apache.cxf.transport.servlet.CXFServlet
> loadSpringBus
> INFO: Load the bus with application context
> 15 oct. 2008 11:52:59 org.apache.cxf.bus.spring.BusApplicationContext
> getConfigResources
> INFO: No cxf.xml configuration file detected, relying on defaults.
>
> 5/ When trying to send a request, I've this error : No operation
> matching request path /rest/Admin/validity/34576549 is found.
>
> I'm sure I've done something wrong but i don't see what... Could you
> help me, please?
> Thanks in advance.
>
>