Why should we have SOAP location in WSDL?
Is soap:add开发者_C百科ress/
or soap:address location=uri /
best practice for Spring Framework web services?
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.
I guess the reason is that WSDL is not bound to SOAP, so when you use it, you have to be explicit.
精彩评论