#how to set up endpoint for my soap webservice?

3 messages · Page 1 of 1 (latest)

harsh zodiac
#

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;
    }
}
  1. why do i need namespace uri? and what the does it even mean?
  2. how does PayloadRoot annotation work? what do i need to use in localpart?
  3. in my xsd file, what to use for xmlns:tns tag and for targetNamespace tag?

thanks in avdance.

prisma grottoBOT
#

This post has been reserved for your question.

Hey @harsh zodiac! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.