原因是否像普通的多模块应用程序编程一样 - 因此客户端可以只使用接口(interface)而不必担心实现细节?
请注意,我谈论的是 WSDI/UDDI/SOAP,而不是普通的应用程序接口(interface)。
最佳答案
WSDL 有 an abstract part and a concrete part它们是分开的,以便允许重用这些定义。同一个合约可以绑定(bind)多种具体的网络协议(protocol)和消息格式。
在 UDDI 的上下文中重复使用定义意味着一个接口(interface),多个实现。
UDDI 的想法之一是可以在运行时发现所需的 Web 服务。您可以进入注册表并查找某个 WSDL 合约的实现:
Beyond the Cookbook: Interfaces and Implementations
[...]
If three different companies have implemented the same WSDL file and a piece of client software has created the proxy/stub code for that WSDL interface, then the client software can communicate with all three of those implementations with the same codebase
[...]
至少理论上是这样。 In practice it turned out another way .
关于web-services - 在基于互联网的面向服务的计算中,将接口(interface)与实现分离的值(value)是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14187529/