Hi

I think someone was able to run a JAX-RS HTTPS demo in a tomcat container.
I myself has always been confused about the way CXFServlet matches requests.
Can you please try "/rest" in both the spring config and URLTemplate ?

If you could run your Tomcat in a debugger then it would be ideal in 
identifying what is
exactly happening. I use http://www.eclipsetotale.com/tomcatPlugin.html in 
Eclipse,
copy it into eclipse plugins, then launch it from your workspace by pointing it 
to your
Tomcat installation and have a breakpoint set in a CXF ServletController.

As far as JAX-RS vs HTTP Binding is concerned, JAX-RS is the future so to say 
:-) because it's going to
be a standard way to do RESTful services inthe Java world...

Cheers, Sergey


----- Original Message ----- From: "rm-ramos" <[EMAIL PROTECTED]>
To: <cxf-user@incubator.apache.org>
Sent: Wednesday, February 13, 2008 6:00 PM
Subject: JAX-RS "No service found" using Spring and JBoss



Hi guys,

I'm trying to move from HTTP-Binding RESTful services to the new Java
standard JAX-RS using CXF+Spring, deployed on JBoss.
However I can't seem to make it work due to a "No service found" problem.
I've been trying to get help from multiple sources, including CXF's IRC
channel, but unfortunately there's not so much written about this. I've
tried to base my config in the CXF docs as much as I could, but still no
luck.


So, moving on to the interesting part:

My web.xml contains the CXFServlet declaration, mapped on
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>

On beans.xml: (not actually how we call it but..)
<!-- RESTful web services -->
  <jaxrs:server id="workOrderOperations" address="/rest/">
    <jaxrs:serviceBeans>
      <bean class="com.messaging.webservices.WorkOrderOperations" />
    </jaxrs:serviceBeans>
  </jaxrs:server>

And on to the implementing class:
   @UriTemplate("/rest/")
   public class WorkOrderOperations {
   (..)
   @HttpMethod("GET")
   @UriTemplate("/wo/{id}/")
   public String getWorkOrder(@UriParam("id") String id){return "it works!
#"+id;}



So, and if I got it right, http://localhost/app-name/services/rest/wo/123
should output a string, but instead a not-so-nice "No service found" message
shows up. And i've tried almost every possible URI, can never find a
service. Is there anything else I'm missing?
I think the CXFServlet is mapped correctly, but I'm not so sure if the
service is being registered somewhere (or where..), so I would really thank
you if you could help me out on this one. It's been 3 days on this now :\

Thanks,
Rui Ramos

PS. I've already though on sticking with HTTP-Bindings ftm, since I'm
starting to lose hope on this one. What are your thoughts about implementing
a REST service using bindings vs. jaxrs, both present and future
implications?
--
View this message in context: 
http://www.nabble.com/JAX-RS-%22No-service-found%22-using-Spring-and-JBoss-tp15461660p15461660.html
Sent from the cxf-user mailing list archive at Nabble.com.

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to