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

标签 java .net xsd wsdl asmx

我从一位非技术中介那里收到了有关将使用我们的网络服务的外部组织的多个文件(.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/

相关文章:

java - 远程运行时 Swing JDialog 速度缓慢

java - TestNG Dataprovider - 过滤测试数据

java - 在Java2D中替换图像像素

c# - 基础连接已关闭。 (HttpWebRequest)

c# - 为什么我的 MSI 安装创建的快捷方式每次都重新启动设置过程?

xml - XSD 架构 : How to specify the number of digits in a value?

java - 使用 XSD 中的元素 "anyAttribute"和 "any"将 XML 编码为 Java

java - 如何获得 Ubuntu 屏幕的实际尺寸?

c# - 从 Byte[] 读取特殊字符

c# - 使用 XML 命名空间在 C# 中针对模式创建和验证 XML