IREP_SOA Integration WSDL概述(概念)

简介: 20150827 Created By BaoXinjian 一、摘要 1. 什么是 WSDL WSDL 指网络服务描述语言 WSDL 使用 XML 编写 WSDL 是一种 XML 文档 WSDL 用于描述网络服务 WSDL 也可用于定位网络服务 WSDL 还不是 W3C 标准 2. WSDL 可描述网络服务(Web Services) WSDL 指网络服务描述语言 (Web Services Description Language)。

20150827 Created By BaoXinjian

一、摘要


1. 什么是 WSDL

WSDL 指网络服务描述语言

WSDL 使用 XML 编写

WSDL 是一种 XML 文档

WSDL 用于描述网络服务

WSDL 也可用于定位网络服务

WSDL 还不是 W3C 标准

2. WSDL 可描述网络服务(Web Services)

WSDL 指网络服务描述语言 (Web Services Description Language)。

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

 

二、WSDL结构


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

2. 一个 WSDL 文档的主要结构是类似这样的:

<definitions>

<types>
   definition of types........
</types>

<message>
   definition of a message....
</message>

<portType>
   definition of a port.......
</portType>

<binding>
   definition of a binding....
</binding>

</definitions>

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

3. 结构组件

(1). WSDL 端口

<portType> 元素是最重要的 WSDL 元素。

它可描述一个 web service、可被执行的操作,以及相关的消息。

可以把 <portType> 元素比作传统编程语言中的一个函数库(或一个模块、或一个类)。

(2). WSDL 消息

<message> 元素定义一个操作的数据元素。

每个消息均由一个或多个部件组成。可以把这些部件比作传统编程语言中一个函数调用的参数。

(3). WSDL types

<types> 元素定义 web service 使用的数据类型。

为了最大程度的平台中立性,WSDL 使用 XML Schema 语法来定义数据类型。

(4). WSDL Bindings

<binding> 元素为每个端口定义消息格式和协议细节。

4. WSDL  services

<services>指定服务的一些信息,主要是指定服务的访问路径。

 

三、WSDL案例


Oracle Erp PLSQL发布为WSDL案例

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="ORACLEBXJ_EMP_PKG" targetNamespace="http://xmlns.oracle.com/apps/bxj/soaprovider/plsql/oraclebxj_emp_pkg/" xmlns:tns="http://xmlns.oracle.com/apps/bxj/soaprovider/plsql/oraclebxj_emp_pkg/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns1="http://xmlns.oracle.com/apps/bxj/soaprovider/plsql/oraclebxj_emp_pkg/create_employee/">
    <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/bxj/soaprovider/plsql/oraclebxj_emp_pkg/create_employee/">
            <include schemaLocation="http://paleonode1.sh.paleotek.com:8002/webservices/SOAProvider/plsql/oraclebxj_emp_pkg/APPS_ORACLEBXJ_EMP_PKG_CREATE_EMPLOYEE.xsd"/>
        </schema>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/bxj/soaprovider/plsql/oraclebxj_emp_pkg/">
            <element name="SOAHeader">
                <complexType>
                    <sequence>
                        <element name="Responsibility" minOccurs="0" type="string"/>
                        <element name="RespApplication" minOccurs="0" type="string"/>
                        <element name="SecurityGroup" minOccurs="0" type="string"/>
                        <element name="NLSLanguage" minOccurs="0" type="string"/>
                        <element name="Org_Id" minOccurs="0" type="string"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </types>
    <message name="CREATE_EMPLOYEE_Input_Msg">
        <part name="header" element="tns:SOAHeader"/>
        <part name="body" element="tns1:InputParameters"/>
    </message>
    <portType name="ORACLEBXJ_EMP_PKG_PortType">
        <operation name="CREATE_EMPLOYEE">
            <input message="tns:CREATE_EMPLOYEE_Input_Msg"/>
        </operation>
    </portType>
    <binding name="ORACLEBXJ_EMP_PKG_Binding" type="tns:ORACLEBXJ_EMP_PKG_PortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="CREATE_EMPLOYEE">
            <soap:operation soapAction="http://paleonode1.sh.paleotek.com:8002/webservices/SOAProvider/plsql/oraclebxj_emp_pkg/"/>
            <input>
                <soap:header message="tns:CREATE_EMPLOYEE_Input_Msg" part="header" use="literal"/>
                <soap:body parts="body" use="literal"/>
            </input>
        </operation>
    </binding>
    <service name="ORACLEBXJ_EMP_PKG_Service">
        <port name="ORACLEBXJ_EMP_PKG_Port" binding="tns:ORACLEBXJ_EMP_PKG_Binding">
            <soap:address location="http://paleonode1.sh.paleotek.com:8002/webservices/SOAProvider/plsql/oraclebxj_emp_pkg/"/>
        </port>
    </service>
</definitions>

 

Thanks and Regards

参考:W3School - http://www.w3school.com.cn/wsdl/

ERP技术讨论群: 288307890
技术交流,技术讨论,欢迎加入
Technology Blog Created By Oracle ERP - 鲍新建
相关文章
|
6月前
|
JavaScript 前端开发 Java
SAP BTP 平台 Cloud Application Programming 编程模型概述
SAP BTP 平台 Cloud Application Programming 编程模型概述
76 0
|
3月前
|
监控 前端开发 数据可视化
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
31 1
|
3月前
|
UED 开发者
@sap 命名空间下 ux-specification 开发包的内容和使用场景介绍
@sap 命名空间下 ux-specification 开发包的内容和使用场景介绍
16 0
|
11月前
|
数据库 数据安全/隐私保护 微服务
(5)go-micro微服务domain层开发
(5)go-micro微服务domain层开发
96 0
编程笔记:三层架构(3-tier architecture)要点-1
编程笔记:三层架构(3-tier architecture)要点-1
|
存储 JavaScript IDE
使用Cloud Application Programming模型开发OData的一个实际例子
刚刚过去的SAP TechEd上,SAP CTO Juergen Mueller向外界传递了一个重要的信息:身处云时代大环境下的SAP从业者,在SAP云平台上该如何选择适合自己的开发方式?
128 0
使用Cloud Application Programming模型开发OData的一个实际例子
|
存储
一个典型的使用 SAP Cloud Application Programming 模型开发的 Fiori 应用
一个典型的使用 SAP Cloud Application Programming 模型开发的 Fiori 应用
一个典型的使用 SAP Cloud Application Programming 模型开发的 Fiori 应用
一步步使用SAP CRM Application Enhancement Tool创建扩展字段
一步步使用SAP CRM Application Enhancement Tool创建扩展字段
95 0
一步步使用SAP CRM Application Enhancement Tool创建扩展字段
编程笔记:三层架构(3-tier architecture)要点
三层架构(3-tier architecture) 1、用户界面层(User Interface layer) 2、业务逻辑层(Business Logic Layer) 3、数据访问层(Data access layer)
310 0
编程笔记:三层架构(3-tier architecture)要点

热门文章

最新文章