hey guys. im trying to make my own soap webservice, and im following official spring guide. and i have question about the endpoint. i have this:
@Endpoint
public class CountryEndpoint {
private static final String NAMESPACE_URI = "http://spring.io/guides/gs-producing-web-service";
private CountryRepository countryRepository;
@Autowired
public CountryEndpoint(CountryRepository countryRepository) {
this.countryRepository = countryRepository;
}
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getCountryRequest")
@ResponsePayload
public GetCountryResponse getCountry(@RequestPayload GetCountryRequest request) {
GetCountryResponse response = new GetCountryResponse();
response.setCountry(countryRepository.findCountry(request.getName()));
return response;
}
}
- why do i need namespace uri? and what the does it even mean?
- how does PayloadRoot annotation work? what do i need to use in localpart?
- in my xsd file, what to use for
xmlns:tnstag and fortargetNamespacetag?
thanks in avdance.