gpt4 book ai didi

java - 从不同语言调用 Web 服务 (asmx)

转载 作者:行者123 更新时间:2023-12-01 05:22:48 25 4
gpt4 key购买 nike

我从一位非技术中介那里收到了有关将使用我们的网络服务的外部组织的多个文件(.xsd 和 .wsdl)的问题。

这对我来说是第一次为外部团体编写 Web 服务,该外部团体将使用 .NET 之外的不同技术(将是 java)。

正如帖子中所读:How to generate XSD files for web service我认为只发送 wsdl 文件就足够了。

谁能告诉我我说得对吗?如果不是这样的话。如何使用此 wsdl 生成合适的 xsd?

最佳答案

据我所知,公开 WSDL 就足够了。
每种能够读取 wsdl 的语言都可以创建代理、包装器和/或类,以便更轻松地访问/使用您的 Web 服务。
Wikipedia page 中所述

The WSDL describes services as collections of network endpoints, or ports. The WSDL specification provides an XML format for documents for this purpose. The abstract definitions of ports and messages are separated from their concrete use or instance, allowing the reuse of these definitions. A port is defined by associating a network address with a reusable binding, and a collection of ports defines a service. Messages are abstract descriptions of the data being exchanged, and port types are abstract collections of supported operations. The concrete protocol and data format specifications for a particular port type constitutes a reusable binding, where the operations and messages are then bound to a concrete network protocol and message format. In this way, WSDL describes the public interface to the Web service.

WSDL is often used in combination with SOAP and an XML Schema to provide Web services over the Internet. A client program connecting to a Web service can read the WSDL file to determine what operations are available on the server. Any special datatypes used are embedded in the WSDL file in the form of XML Schema. The client can then use SOAP to actually call one of the operations listed in the WSDL file using XML or HTTP.

关于java - 从不同语言调用 Web 服务 (asmx),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10107948/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com