Alexis
Alexis

Reputation: 406

Why should we have SOAP location in WSDL?

Is soap:address/ or soap:address location=uri / best practice for Spring Framework web services?

Upvotes: 2

Views: 2026

Answers (2)

Organic Advocate
Organic Advocate

Reputation: 919

The soap:address location is necessary in the WSDL file because the WSDL file is a contract for providing a service. A good contract should be clear on what the service offers as well as where the service can be found and accessed. The provider of a service should be committed through the WSDL contract to offer the service in the specified location. That's why the location is required according to the w3 website.

If you are using Spring to create a web service you access specify the location in a property file to easily change it later. If you are using Spring to create a client that uses a web service I found that the soap:address location in the wsdl has no effect. Spring web service client ignore it and uses the value in the defaultUri property of org.springframework.ws.client.core.WebServiceTemplate.

Upvotes: 1

Gabriel Ščerbák
Gabriel Ščerbák

Reputation: 18570

I guess the reason is that WSDL is not bound to SOAP, so when you use it, you have to be explicit.

Upvotes: 0

Related Questions