Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you have a simple CRUD based Java class, CXF can try to build up a set of resources automatically for you with no annotations or configuration. This is best explained through an example. Lets take a look at a typical CRUD class:

Code Block
java
java
import javax.jws.WebService;

@WebService
public interface PeopleService {
  Collection<Person> getPeople();
  Person getPerson(long id);
  void addPerson(Person person);
  void updatePerson(long id, Person person);
  void deletePerson(long id);
}
Note
titleWebService Annotation

The @WebService annotation is required.

Using CXF's convention based mapping, a set of resources will be created and mapped to these operations.

...