`
youyun_2008
  • 浏览: 109890 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

Webservice wsdl 结构简介

阅读更多
WSDL 文档在Web服务的定义中使用下列元素:

    Types - 数据类型定义的容器,它使用某种类型系统(一般地使用XML Schema中的类型系统)。
    Message - 通信消息的数据结构的抽象类型化定义。使用Types所定义的类型来定义整个消息的数据结构。
    Operation - 对服务中所支持的操作的抽象描述,一般单个Operation描述了一个访问入口的请求/响应消息对。
    PortType - 对于某个访问入口点类型所支持的操作的抽象集合,这些操作可以由一个或多个服务访问点来支持。
    Binding - 特定端口类型的具体协议和数据格式规范的绑定。
    Port - 定义为协议/数据格式绑定与具体Web访问地址组合的单个服务访问点。
    Service- 相关服务访问点的集合。

<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions
    targetNamespace="http://com.liuxiang.xfireDemo/HelloService"
    xmlns:tns="http://com.liuxiang.xfireDemo/HelloService"
    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"
    xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            attributeFormDefault="qualified" elementFormDefault="qualified"
            targetNamespace="http://com.liuxiang.xfireDemo/HelloService">
            <xsd:element name="sayHello">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="1"
                            name="name" nillable="true" type="xsd:string" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="sayHelloResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="1"
                            name="out" nillable="true" type="xsd:string" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="sayHelloResponse">
        <wsdl:part name="parameters" element="tns:sayHelloResponse" />
    </wsdl:message>
    <wsdl:message name="sayHelloRequest">
        <wsdl:part name="parameters" element="tns:sayHello" />
    </wsdl:message>
    <wsdl:portType name="HelloServicePortType">
        <wsdl:operation name="sayHello">
            <wsdl:input name="sayHelloRequest"
                message="tns:sayHelloRequest" />
            <wsdl:output name="sayHelloResponse"
                message="tns:sayHelloResponse" />
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="HelloServiceHttpBinding"
        type="tns:HelloServicePortType">
        <wsdlsoap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="sayHello">
            <wsdlsoap:operation soapAction="" />
            <wsdl:input name="sayHelloRequest">
                <wsdlsoap:body use="literal" />
            </wsdl:input>
            <wsdl:output name="sayHelloResponse">
                <wsdlsoap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HelloService">
        <wsdl:port name="HelloServiceHttpPort"
            binding="tns:HelloServiceHttpBinding">
            <wsdlsoap:address
                location="http://localhost:8080/xfire/services/HelloService" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
分享到:
评论
6 楼 aiyust070 2011-11-01  
youyun_2008 写道
WSDL 绑定可为 web service 定义消息格式和协议细节。

soap:binding 元素有两个属性 - style 属性和 transport 属性。

style 属性可取值 "rpc" 或 "document"。在这个例子中我们使用 document。transport 属性定义了要使用的 SOAP 协议。在这个例子中我们使用 HTTP。

operation 元素定义了每个端口提供的操作符。



style 属性怎么设置成值 "rpc"?
5 楼 youyun_2008 2011-06-22  
http://www.w3school.com.cn/soap/soap_envelope.asp
4 楼 youyun_2008 2011-06-22  
WSDL 绑定可为 web service 定义消息格式和协议细节。

soap:binding 元素有两个属性 - style 属性和 transport 属性。

style 属性可取值 "rpc" 或 "document"。在这个例子中我们使用 document。transport 属性定义了要使用的 SOAP 协议。在这个例子中我们使用 HTTP。

operation 元素定义了每个端口提供的操作符。

3 楼 youyun_2008 2011-06-22  
<portType> 元素是最重要的 WSDL 元素。
可以把该元素比作传统编程语言中的一个函数库(或一个模块、或一个类),而把每个操作比作传统编程语言中的一个函数。
2 楼 youyun_2008 2011-06-22  
http://www.w3school.com.cn/wsdl/index.asp
1 楼 youyun_2008 2011-06-22  
数据类型的转换、对象序列化以及安全性等比较重要

相关推荐

    WebService WSDL结构分析

    WebService WSDL结构分

    WebService_WSDL结构分析

    WebService_WSDL结构分析,分析如何开发webservice

    webservice ,WSDL结构分析

    WSDL结构分析,webservice讲解。视频教程

    wsdl详解(webservice)

    wsdl 详细介绍 WSDL (Web Services Description Language,Web服务描述语言)是一种XML Application,他将Web服务描述定义为一组服务访问点,客户端可以通过... 本文将详细讲解WSDL文档的结构,并分析每个元素的作用。

    WebService之WSDL自学笔记

    本人自学WebService之WSDL自学笔记。内有详细的例子解析,下面为文档目录。 1、WSDL概述 2 1.1 WSDL 文档结构 2 1.1.1 WSDL Bindings 3 1.1.2 WSDL 端口 4 1.1.3 WSDL 消息 4 1.1.4 WSDL types 4 1.2 WSDL 实例 5

    WSDL结构分析详解汇总

    含有自己写的WSDL结构分析详解汇总.chm,和找的WebService描述语言WSDL详解.pdf

    WebService描述语言WSDL详解

    WebService描述语言WSDL详解,包括WSDL文档结构,每个关键节点的详细解释,很实用的说明文档

    wsdl文件结构详细分析

    对webservic中 wsdl文件进行了详细的分析和介绍

    webservice体系结构

    webservice体系结构、介绍SOAP、UDDI、WSDL、WSFL等相关知识

    C#与SAP WebService对接实例源码

    C# .NET与SAP Web Service实例源码,包括:SAP中RFC源码,C#调用Web Service实例. SOAMANAGER配置实例说明:http://blog.csdn.net/a419893240/article/details/52104071 ,C# Web Service 实例说明:...

    使用CXF实现WebService

    该地址为WebService服务端开放地址,从WSDL文件中,可以看到方法结构等 6、访问地址:http://127.0.0.1:8080/MyCXFClient 该地址为客户端调用WebService,输入名称,点击提交,既向WebService服务端发送请求,返回...

    Web服务中的WSDL文档结构分析

    解析Web服务中WSDL的具体作用,以及WSDL文档的基本结构,分析每个元素文件的作用。WSDL是Web服务描述语言,由XML语言编写的文档。这种文档用来描述某个Web service,规定其服务的位置,以及此服务所提供的操作。

    WebService技术及其应用实例论文

    本文首先对WebService技术进行了简介,在了解它的使用情况和优缺点后,对它和目前现有分布式CORBA技术进行了分析和对比,进而对它的体系结构有深入的了解。其次介绍了WebService技术中的关键技术,其中包括可扩展性...

    gsoap 2.8 (SOAP/XML 关于C/C++ 语言的自动化实现工具内附 CSharp webservice例子,及GSOAP client和server例子)

     上面的命令根据制定URL提供的WSDL文档生成一个C++语法结构的头文件。  如果需要生成一个纯C的头文件,需要一下命令:  $ wsdl2h -c -o quote.h  更多关于WSDL解析器及其选项的细节信息,请参见8.2.10节。  ...

    WebService之JAX-WS自学笔记

    本人自学JAX-WS笔记和简单例子,文档标题结构如下: JAX-WS使用教程 1、JAX-WS概述 2、创建Web Service 2.1 从java开始 2.1.1 运行wsgen 2.1.2 生成的WSDL和XSD 2.1.3 目录结构 2.2 从WSDL开始 ...

    eSDK TP V100R005C01 开发指南 01(服务端WSDL, JAVA)

    介绍eSDK TP的体系结构,结合B/S版Demo介绍如何通过eSDK TP提供的WebService接口进行第三方应用业务开发。

    java命名规范 开发规范

    5. 响应一个请求的分层结构约定,列举几个示例(常规调用、Ajax调用、WebService调用、提供WebService暴露、硬件设备接口调用); 6. 验证代码质量的约定,如JUnit、EMMA、FindBugs、CheckStyle、PMD的使用;Hudson...

Global site tag (gtag.js) - Google Analytics