I am creating a REST service using CXF 3.1.4 and JAX-RS. I have created an interface that is shared between client and server:
public interface SubscriptionsService {
@POST
@Path("/subscriptions")
SubscriptionResponse create(SubscriptionRequest request);
}
public class SubscriptionResponse {
private String location;
}
The client is created using JAXRSClientFactoryBean and the server is created using JAXRSServerFactoryBean.
The create() method defined above should return a Location header but I have no idea how to do it.