欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

XML模式:WSD

互聯(lián)網(wǎng)   發(fā)布時(shí)間:2008-10-17 20:15:49   作者:佚名   我要評(píng)論
Web 服務(wù)描述語(yǔ)言(Web Services Description Language,WSDL)提供了一種描述 Web 服務(wù)(大多使用 SOAP)的簡(jiǎn)單方法。WSDL 允許您描述利用 SOAP 標(biāo)準(zhǔn)所提供的服務(wù)和接口。 比方說(shuō),可以創(chuàng)建描述某臺(tái)服務(wù)器上提供的服務(wù)的 WSDL 文件,然后把該文件分發(fā)給需要這些服務(wù)的 W

Web 服務(wù)描述語(yǔ)言(Web Services Description Language,WSDL)提供了一種描述 Web 服務(wù)(大多使用 SOAP)的簡(jiǎn)單方法。WSDL 允許您描述利用 SOAP 標(biāo)準(zhǔn)所提供的服務(wù)和接口。
比方說(shuō),可以創(chuàng)建描述某臺(tái)服務(wù)器上提供的服務(wù)的 WSDL 文件,然后把該文件分發(fā)給需要這些服務(wù)的 Web 服務(wù)消費(fèi)者。通過(guò)閱讀和解析 WSDL 文件,消費(fèi)者能夠了解到使用這些 Web 服務(wù)需要知道的所有信息,包括可以交換的數(shù)據(jù)類型、參數(shù)以及返回的各種錯(cuò)誤和其他信息。
再次使用來(lái)自 W3C 的例子,可以看到不同遠(yuǎn)程函數(shù)的聲明和交換的數(shù)據(jù)都是通過(guò)結(jié)構(gòu)的 XML 定義處理的,如清單 3 所示。
清單 3. 不同遠(yuǎn)程函數(shù)和交換數(shù)據(jù)的 XML 定義

<?xml version="1.0"?> <!-- root element wsdl:definitions defines set of related services --> <wsdl:definitions name="EndorsementSearch" targetNamespace="http://namespaces.snowboard-info.com" xmlns:es="http://www.snowboard-info.com/EndorsementSearch.wsdl" xmlns:esxsd="http://schemas.snowboard-info.com/EndorsementSearch.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <!-- wsdl:types encapsulates schema definitions of communication types; here using xsd --> <wsdl:types> <!-- all type declarations are in a chunk of xsd --> <xsd:schema targetNamespace="http://namespaces.snowboard-info.com" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <!-- xsd definition: GetEndorsingBoarder [manufacturer string, model string] --> <xsd:element name="GetEndorsingBoarder"> <xsd:complexType> <xsd:sequence> <xsd:element name="manufacturer" type="string"/> <xsd:element name="model" type="string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!-- xsd definition: GetEndorsingBoarderResponse [... endorsingBoarder string ...] --> <xsd:element name="GetEndorsingBoarderResponse"> <xsd:complexType> <xsd:all> <xsd:element name="endorsingBoarder" type="string"/> </xsd:all> </xsd:complexType> </xsd:element> <!-- xsd definition: GetEndorsingBoarderFault [... errorMessage string ...] --> <xsd:element name="GetEndorsingBoarderFault"> <xsd:complexType> <xsd:all> <xsd:element name="errorMessage" type="string"/> </xsd:all> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <!-- wsdl:message elements describe potential transactions --> <!-- request GetEndorsingBoarderRequest is of type GetEndorsingBoarder --> <wsdl:message name="GetEndorsingBoarderRequest"> <wsdl:part name="body" element="esxsd:GetEndorsingBoarder"/> </wsdl:message> <!-- response GetEndorsingBoarderResponse is of type GetEndorsingBoarderResponse --> <wsdl:message name="GetEndorsingBoarderResponse"> <wsdl:part name="body" element="esxsd:GetEndorsingBoarderResponse"/> </wsdl:message> <!-- wsdl:portType describes messages in an operation --> <wsdl:portType name="GetEndorsingBoarderPortType"> <!-- the value of wsdl:operation eludes me --> <wsdl:operation name="GetEndorsingBoarder"> <wsdl:input message="es:GetEndorsingBoarderRequest"/> <wsdl:output message="es:GetEndorsingBoarderResponse"/> <wsdl:fault message="es:GetEndorsingBoarderFault"/> </wsdl:operation> </wsdl:portType> <!-- wsdl:binding states a serialization protocol for this service --> <wsdl:binding name="EndorsementSearchSoapBinding" type="es:GetEndorsingBoarderPortType"> <!-- leverage off soap:binding document style ...(no wsdl:foo pointing at the soap binding) --> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <!-- semi-opaque container of network transport details classed by soap:binding above ... --> <wsdl:operation name="GetEndorsingBoarder"> <!-- again bind to SOAP? ... --> <soap:operation soapAction="http://www.snowboard-info.com/ EndorsementSearch"/> <!-- further specify that the messages in the wsdl:operation "GetEndorsingBoarder" use SOAP? ... --> <wsdl:input> <soap:body use="literal" namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/> </wsdl:input> <wsdl:output> <soap:body use="literal" namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/> </wsdl:output> <wsdl:fault> <soap:body use="literal" namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/> </wsdl:fault> </wsdl:operation> </wsdl:binding> <!-- wsdl:service names a new service "EndorsementSearchService" --> <wsdl:service name="EndorsementSearchService"> <wsdl:documentation>snowboarding-info.com Endorsement Service</ wsdl:documentation> <!-- connect it to the binding "EndorsementSearchSoapBinding" above --> <wsdl:port name="GetEndorsingBoarderPort" binding="es:EndorsementSearchSoapBinding"> <!-- give the binding an network address --> <soap:address location="http://www.snowboard-info.com/EndorsementSearch"/> </wsdl:port> </wsdl:service> </wsdl:definitions>

WSDL 聲明了消息類型、默認(rèn)數(shù)據(jù)類型和內(nèi)容以及交換的數(shù)據(jù)結(jié)構(gòu)。
訪問(wèn)服務(wù)器上 SOAP 結(jié)構(gòu)需要使用的一切信息都可以在這個(gè) WSDL 中找到。大多數(shù)語(yǔ)言和環(huán)境都提供一種閱讀和解析 WSDL 的機(jī)制,以確定可用的函數(shù)和數(shù)據(jù)交換。
WSDL 不僅定義了用于交換信息的 SOAP 接口,通過(guò)適當(dāng)?shù)?WSDL 生成程序,還可用于創(chuàng)建發(fā)送請(qǐng)求、生成并格式化響應(yīng)所需要的代碼。
WSDL 和 SOAP 組成了一個(gè)強(qiáng)大的遠(yuǎn)程過(guò)程調(diào)用系統(tǒng)。

相關(guān)文章

  • MIME類型中application/xml與text/xml的區(qū)別介紹

    這篇文章介紹了MIME類型中application/xml與text/xml的區(qū)別,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2021-12-28
  • 詳解XML中的模式Schema

    XML中擁有Schema特性,能夠比DTD更加強(qiáng)大地引入元素結(jié)構(gòu),下面我們就來(lái)詳解XML中的模式Schema的概念及作用和用法,需要的朋友可以參考下
    2021-11-30
  • XML基本概念入門(mén)學(xué)習(xí)指南

    這篇文章主要介紹了XML基本概念入門(mén)學(xué)習(xí)指南,包括其與HTML的關(guān)系以及元素和特殊標(biāo)簽等,需要的朋友可以參考下
    2016-06-24
  • XML中的DTD文檔類型定義完全解析

    XML標(biāo)簽的自定義功能非常強(qiáng)大,比如本文將要講解的DTD(Document Type Definition)就帶給人們一種面向?qū)ο蟀愕母杏X(jué),well,下面就來(lái)看一下XML中的DTD文件類型定義完全解析
    2016-06-24
  • 簡(jiǎn)介XML文檔的閱讀與編輯

    這篇文章主要介紹了XML文件的閱讀與編輯,最常用的工具當(dāng)然還是瀏覽器中的控制臺(tái)與源代碼查看,需要的朋友可以參考下
    2016-02-16
  • 簡(jiǎn)單了解XML中的命名空間

    這篇文章主要介紹了XML的命名空間,包括命名空間的聲明等XML入門(mén)學(xué)習(xí)中的基礎(chǔ)知識(shí),需要的朋友可以參考下
    2016-02-16
  • 解析XML中的樹(shù)形結(jié)構(gòu)與DOM文檔對(duì)象模型

    這篇文章主要介紹了XML中的樹(shù)形結(jié)構(gòu)與DOM文檔對(duì)象模型,文中舉了JavaScript解析DOM對(duì)象的例子,需要的朋友可以參考下
    2016-02-15
  • 詳解XML編程中的模式定義XSD

    這篇文章主要介紹了詳解XML編程中的模式定義XSD,講解了如何在XML文檔中聲明模式及定義類型等內(nèi)容,需要的朋友可以參考下
    2016-02-15
  • 深入解析XML中的DTD文檔類型定義

    這篇文章主要介紹了XML中的DTD文檔類型定義,是XML入門(mén)學(xué)習(xí)中的基礎(chǔ)知識(shí),需要的朋友可以參考下
    2016-02-15
  • 淺談XML代碼編寫(xiě)的編碼與驗(yàn)證問(wèn)題

    這篇文章主要介紹了XML代碼編寫(xiě)的編碼與驗(yàn)證問(wèn)題,與HTML類似,XML文件的編碼也能在序言部分被指定,需要的朋友可以參考下
    2016-02-15

最新評(píng)論