Querying an existing HTTP Invoker service

In this recipe, we will configure a Spring web application that will be able to execute a method on an existing HTTP Invoker service.

Getting ready

We will query the HTTP Invoker service of the previous Creating an HTTP Invoker service recipe.

We need the UserService interface so that our application knows the methods available on the HTTP Invoker service:

public interface UserService {
  public abstract List<User> findAll();
  public abstract void addUser(User user);
}

User objects will be exchanged over the network, so we need the User class of the previous recipe as well:

public class User implements Serializable { private String name; private int age; public User(String name, int age) { this.name = name; this.age ...

Get Spring Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.