SOAP Web 服务开发支持
我正在开发一个使用来自 WCF Web 服务的数据的应用程序,但需要从不同供应商提供的不同服务器应用程序中检索数据。
问题是哪种编程语言支持从现有的 WSDL 开发 Web 服务?
例如,在 .NET 中,您可以使用“wsdl.exe /serverInterface”来生成服务器接口。请参阅实现服务接口
在 Java 中,请参阅:自上而下的 Java Bean Web 服务
但我不希望供应商依附于明确的技术。
I am developing an appplication that consume data from WCF Web Service, but the data need to be retrieve from differents servers applications provided by different suppliers.
The question is what programming language support the develop of a Web Services from a WSDL that already exist?
For example in .NET you could use "wsdl.exe /serverInterface" to generate a server interface. See Implementing Service Interface
In Java see: Top Down Java Bean Web Service
But I don't want the suppliers to be attached to an explicit tecnology.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在谈论网络服务。 Web 服务的理念是它允许异构机器(和技术)之间进行交互。
为了进行交互,机器不需要使用相同的编程语言或技术。重要的是所使用的协议。在你的例子中,肥皂。
该协议定义了通信接口或合约。对于 Web 服务,接口由 Web 服务描述语言(您的 WSDL)进行描述。
WSDL 采用(或多或少)人类可读的格式,但更重要的是采用机器可处理的格式。这个想法是,您使用 WSDL 来生成遵守契约的代码/类;在服务器端,它们被称为骨架,在客户端,它们被称为存根。
许多编程语言都有从 WSDL 生成存根/骨架的方法或工具,但同样,这不是重要的部分。 重要的是尊重合同。
WSDL 仅允许您自动创建一些样板代码。不强制使用 WSDL 来创建服务器/客户端,因此可以使用任何技术(无论有或没有 WSDL)。
只要你这样做,你就不会依附于某种明确的技术。因此,在您提到的“WCF Web Service”中,您可以删除“WCF”一词。
您唯一必须注意的是系统之间的接口。您必须确保Web 服务互操作性,因为我们并不生活在理想的世界中,并且一些具体细节来自如果不小心的话,合同中的技术堆栈“可能会泄漏”。
You are taking about web services. The idea with web services is that it allows interactions between heterogeneous machines (and technologies).
For the interaction to happen, there is no need for the machine to use the same programming language or technology. What's important is the protocol used. In your case SOAP.
The protocol defines the communication interface or contract. For web services, the interface is described by the Web Services Description Language (your WSDL).
WSDL is in a (more or less) human readable format, but more importantly in a machine-processable format. The idea is that you use the WSDL to generate the code/classes that respect the contract; at the server side they are called Skeletons, and at the client side, Stubs.
A lot of programming languages have means or tools to generate stubs/skeletons from WSDL but again, that's not the important part. The important part is respecting the contract.
The WSDL just allows you to automate the creation of some boilerplate code. It's not mandatory to use the WSDL to create the server/client so any technology can be used (with or without the WSDL).
As long as you do that, you do not attach yourself to an explicit technology. So in the "WCF Web Service" you mention, you can drop the "WCF" word.
The only care you must take is with the interface between the systems. You must ensure the Web Services Interoperability as we don't live in an ideal world and some specifics from the technology stack "could leak" in the contract if you are not careful.