Hi Joseph,
I have looked at the users guide, but I kept getting tripped up on the fact
that I'm using Tomcat and the examples are not for tomcat.
If you are going to use java, tomcat and cxf for a ReST service. Then I
suggest reading up on the user's guide.
(http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html).
jsr311-api-0.8.jar contains all the annotations mentioned in that page.
I followed this page and am able to have a ReST service in a day or two.
For simple services, the following headers should suffice:
Resource class
@Path
HTTP Method
Dealing with Parameters
Sub-resource locators.
Configuring JAX-RS services in container with Spring configuration file. **
From the samples folder of the downloaded jar, its only difference is
that the service instances are configured/started programatically. The
section above which i marked with ** should help have the same service
deployed in tomcat.
To set-up the said services in tomcat, just create a folder in webapps.
have WEB-INF in that folder, and lib in the WEB-INF folder. Have the
web.xml and beans.xml in the WEB-INF directory; and the needed jars in
the lib including your service.
Hth.
Gabo
Benson Margulies wrote:
Why don't you start by getting to the point where you have a .war file
for a REST-ful service, based on the samples, that works in jetty?
Then drop that into Tomcat and tell us what doesn't work.
On Tue, Oct 28, 2008 at 7:21 PM, Joseph Fair <[EMAIL PROTECTED]> wrote:
Thanks. I have looked at that, but it raises some questions:
1. Where do I put the @WebService annotations? I started in the
interface, but this has them on the implementation, too.
2. This sets a "targetNameSpace" attribute in the annotation for the
interface
@WebService(targetNamespace = "http://customer.acme.com")
public interface CustomerService {
I tried that, too, but with no visible difference.
-----Original Message-----
From: Andrew Clegg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2008 4:43 PM
To: [email protected]
Subject: Re: New CXF User question: Need a replacement for a PHP web
service
I can't be much help then I'm afraid, although there's plenty of
others here who know much more about REST.
In the meantime though, maybe this would help?
http://www.java2s.com/Code/Java/Web-Services-SOA/Thisdemoshowshowtocreat
eRESTfulservicesusingCXFsHTTPbinding.htm
Andrew.
>
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.8.4/1753 - Release Date: 10/28/2008 9:20 PM