zoukankan      html  css  js  c++  java
  • WSDL教程

    WSDL教程

    WSDL内容包括

    • WSDL简介

    • WSDL文档

    • WSDL端口

    • WSDL绑定

    • WSDL UDDI

    • WSDL语法


    什么是WSDL?

    简介:

    WSDL(Web Services Description Language,网络服务描述语言),一种服务的描述语言

    特点:

    • 基于XML

    作用:

    描述 Web Services 以及如何对它们进行访问。

    WSDL是使用 XML 编写的文档。这种文档可描述某个 Web service。它可规定服务的位置,以及此服务提供的操作(或方法)


    WSDL文档

    本质:

    是一个简单的 XML 文档

    作用:

    包含一系列描述某个 web service 的定义

    WSDL文档结构

    WSDL 文档是利用这些主要的元素来描述某个 web service 的:

    元素定义
    <portType> web service 执行的操作
    <message> web service 使用的消息
    <types> web service 使用的数据类型
    <binding> web service 使用的通信协议
    • port是端口之意,端口类型定义了webservice提供的服务---执行的操作---可以理解为一个函数库(类、模块等)

    • message是消息之意,定义了webservice使用的消息---可以理解为一个函数调用的参数---形参

    • types是类型之意,定义了webservice的数据类型---使用XML Schema语法来定义数据类型

    • binding是粘合、捆绑之意,定义了伴随着消息而使用的通信协议---为每个端口定义消息格式和协议细节

    WSDL文档的主要结构:

    <definitions>
       <!--definitions n.定义-->

    <types>
    data type definitions........
    </types>

    <message>
    definition of the data being communicated....
    </message>

    <portType>
    set of operations......
    </portType>

    <binding>
    protocol and data format specification....
    </binding>

    </definitions>
    <!--
    WSDL 文档可包含其它的元素,比如 extension 元素,以及一个 service 元素,此元素可把若干个 web services 的定义组合在一个单一的 WSDL 文档中。
    -->

    实例:

    <message name="getTermRequest">
     <part name="term" type="xs:string"/>
    </message>

    <message name="getTermResponse">
     <part name="value" type="xs:string"/>
    </message>

    <portType name="glossaryTerms">
     <operation name="getTerm">
       <input message="getTermRequest"/>
       <output message="getTermResponse"/>
     </operation>
    </portType>

    在这个例子中,<portType> 元素把 "glossaryTerms" 定义为某个端口的名称,把 "getTerm" 定义为某个操作的名称。

    操作 "getTerm" 拥有一个名为 "getTermRequest" 的输入消息,以及一个名为 "getTermResponse" 的输出消息。

    <message> 元素可定义每个消息的部件,以及相关联的数据类型。

    glossaryTerms 是一个函数库,而 "getTerm" 是带有输入参数 "getTermRequest" 和返回参数 getTermResponse 的一个函数。

    It's a lonely road!!!
  • 相关阅读:
    Android JNI的使用方法
    Android4.4中jni的native的方法无法找到的解决方案
    如何解决Your project contains C++ files but it is not using a supported native build system
    android-studio开发NDK错误记录:bash: ../../build/intermediates/classes/debug: is a directory
    Android Studio 编译: Program type already present: XXX 解决方案
    ScriptEngineManager is not available in Android and causes a NoClassDefFoundError
    Android 机器人项目Pepper_Android
    Android 优秀开源项目
    准备开发一个运行在Android上的JavaME模拟器
    上周热点回顾(2.3-2.9)团队
  • 原文地址:https://www.cnblogs.com/JunkingBoy/p/14667451.html
Copyright © 2011-2022 走看看