Q:

Type The annotation @ResponsePayload is disallowed for this location

I had make a endpoint to my SOAP application and when a make this:
@ResponsePayload
public GetCountryResponse getCountry(@ResponsePayload GetCountryRequest request) {
    GetCountryResponse response = new GetCountryResponse();
    response.setCountry(countryRepository.findCountry(request.getName()));
}

This second @ResponsePayload in the method getCountry give me this error:

The annotation @ResponsePayload is disallowed for this location

A:

In ResponsePayload doc we can find below:

Annotation which indicates that a method return value should be bound
  to the response payload. Supported for annotated endpoint methods.

SO using @RequestPayload instead of @ResponsePayload 
@ResponsePayload
public GetCountryResponse getCountry(@RequestPayload GetCountryRequest request) {
    GetCountryResponse response = new GetCountryResponse();
    response.setCountry(countryRepository.findCountry(request.getName()));
}

More details can be found at ResponsePayload and RequestPayload

