简体   繁体   中英

Why should we have SOAP location in WSDL?

Spring Framework Web服务的soap:address/soap:address location=uri /最佳实践?

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.

我猜想原因是WSDL没有绑定到SOAP,因此在使用它时,必须明确。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM