Java Web services 开发之概念

Java Web services 开发之概念

The following standards play key roles in Web services: Universal Description, Discovery and Integration (UDDI), Web Services Description Language (WSDL), Web Services Inspection Language (WSIL), Simple Object Access Protocol (SOAP) and Web Services Interoperability (WS-I). The relationship between these standards is described in Figure .

与Web services密切相关的主要标准有以下几种:

1、UDDI

UDDI是平台无关的,为业务提供了一个全局的注册、查找Web Services 的规范。

UDDI has two functions:

  • It is a SOAP-based protocol that defines how clients communicate with UDDI registries.
  • It is a particular set of global replicated registries.

UDDI includes an XML schema for SOAP messages that defines a set of documents to describe business and services information, a common set of APIs for querying and publishing information to the directories, and an API for replicating directory entries between peer UDDI nodes.

2、WSIL

Web Services Inspection Language (WSIL) is a service discovery mechanism that is an alternative to UDDI as well as complementary to UDDI. When you discover Web services with UDDI, you go to a centralized registry.  WSIL is an alternative approach to Web service discovery.  WSIL allows you to go directly to the service provider and ask for the services it provides.

WSIL也是用于查找Web Services 的机制。它是UDDI的补充。

The Web Services Inspection Language (WSIL) and the Universal Description, Discovery, and Integration (UDDI) specification both address issues related to Web service discovery.  However, each specification takes a different approach to the discovery of Web services.  The two specifications can be used separately or jointly; searching with WSIL can result in finding items in UDDI.

3、WSDL

WSDL is an XML-based open specification that describes the interfaces to and instances of Web services on the network. It is extensible, so endpoints can be described regardless of the message formats or network protocols that are used to communicate.

Relationship between UDDI and WSDL
o_wsdluddi.gif

Figure  illustrates the relationship between UDDI and WSDL. The WSDL service element references the WSDL binding element. The URL of the document containing the WSDL binding element is published to the UDDI business registry as a tModel. The URL of the document containing the WSDL service element is published to the UDDI business registry as a businessService and contains information about the bindingTemplate.


4、SOAP

SOAP is an XML-based standard for messaging over HTTP and other Internet protocols. It is a lightweight protocol for the exchange of information in a decentralized, distributed environment. It is based on XML and consists of three parts:

  • An envelope that defines a framework for describing what is in a message and how to process it.
  • A set of encoding rules for expressing instances of application-defined data types.
  • A convention for representing remote procedure calls and responses.

SOAP enables the binding and usage of discovered Web services by defining a message path for routing messages. SOAP may be used to query UDDI for Web services.

简单对象访问协议(SOAP)是一种轻量的、简单的、基于 XML 的协议,它被设计成在 WEB 上交换结构化的和固化的信息。 SOAP 可以和现存的许多因特网协议和格式结合使用,包括超文本传输协议( HTTP),简单邮件传输协议(SMTP),多用途网际邮件扩充协议(MIME)。它还支持从消息系统到远程过程调用(RPC)等大量的应用程序。

  SOAP 包括三个部分:

  • SOAP 封装:它定义了一个框架,该框架描述了消息中的内容是什么,谁应当处理它以及它是可选的还是必须的。
  • SOAP 编码规则:它定义了一种序列化的机制,用于交换应用程序所定义的数据类型的实例。
  • SOAP RPC 表示:它定义了用于表示远程过程调用和应答的协定。

  SOAP 消息基本上是从发送端到接收端的单向传输,但它们常常结合起来执行类似于请求 / 应答的模式。所有的 SOAP 消息都使用 XML 编码。一条 SOAP 消息就是一个包含有一个必需的 SOAP 的封装包,一个可选的 SOAP 标头和一个必需的 SOAP 体块的 XML 文档。

SOAP 消息格式:

  SOAP 标头

  <SOAP-ENV: Envelope Attributes>

  <SOAP-ENV:Body>

  Attributes

  </SOAP-ENV:Body>

  </SOAP-ENV:Envelope>

o_soapudws.gif

你可能感兴趣的:(Java Web services 开发之概念)