SOAP学习笔记(1)

笔记

一       SOAP Roles and SOAP Nodes

SOAP node

The embodiment of the processing logic necessary to transmit, receive, process and/or relay a SOAP message, according to the set of conventions defined by this recommendation. A SOAP node is responsible for enforcing the rules that govern the exchange of SOAP messages (see 2. SOAP Processing Model). It accesses the services provided by the underlying protocols through one or more SOAP bindings.

SOAP role

A SOAP receiver's expected function in processing a message. A SOAP receiver can act in multiple roles.

【理解】

SOAP node是一个实际存在的节点,该节点可以处理SOAP消息,SOAP node是一种物理上的概念;SOAP role是处理SOAP消息时,SOAP node所扮演的角色,是一个逻辑上的概念。一个SOAP node可以扮演多个SOAP role,一个SOAP role也可以由多个SOAP node所扮演。

 

二       预定义的SOAP role

Short-name

Name

Description

next

"http://www.w3.org/2003/05/soap-envelope/role/next"

Each SOAP intermediary and the ultimate SOAP receiver MUST act in this role.

none

"http://www.w3.org/2003/05/soap-envelope/role/none"

SOAP nodes MUST NOT act in this role.

ultimateReceiver

"http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"

The ultimate receiver MUST act in this role.

 

三       处理SOAP消息的过程

1.      Determine the set of roles in which the node is to act. The contents of the SOAP envelope, including any SOAP header blocks and the SOAP body, MAY be inspected in making such determination.

2.      Identify all header blocks targeted at the node that are mandatory.

3.      If one or more of the SOAP header blocks identified in the preceding step are not understood by the node then generate a single SOAP fault with the Value of Code set to "env:MustUnderstand" (see 5.4.8 SOAP mustUnderstand Faults). If such a fault is generated, any further processing MUST NOT be done. Faults relating to the contents of the SOAP body MUST NOT be generated in this step.

4.      Process all mandatory SOAP header blocks targeted at the node and, in the case of an ultimate SOAP receiver, the SOAP body. A SOAP node MAY also choose to process non-mandatory SOAP header blocks targeted at it.

5.      In the case of a SOAP intermediary, and where the SOAP message exchange pattern and results of processing (e.g. no fault generated) require that the SOAP message be sent further along the SOAP message path, relay the message as described in section 2.7 Relaying SOAP Messages.

 

四       Relaying SOAP Messages (relayable SOAP header blocks)

Role

Header block

Short-name

Assumed

Understood & Processed

Forwarded

next

Yes

Yes

No, unless reinserted

No

No, unless relay ="true"

user-defined

Yes

Yes

No, unless reinserted

No

No, unless relay ="true"

No

n/a

Yes

ultimateReceiver

Yes

Yes

n/a

No

n/a

none

No

n/a

Yes

【理解】

所谓Relaying SOAP Message(SOAP消息重放)仅是在SOAP node处理一个Header Block,但却因为不能理解该Header block(can’t understand)而忽略该Header block时才有意义,(这个Header block没有设置mustUnderstand为true,否则无法理解时应返回一个SOAP Fault,而不是继续向前传递SOAP消息,这时也没有relay的意义)。这时若Header block的relay属性为true,则SOAP node必须将该Header block保留在SOAP消息中,并向前转发给下一个SOAP node。

总结来说,SOAP消息重放仅对SOAP中间节点(SOAP intermediary)有意义,并且仅当该中间节点无法处理一个需由它处理但又未设置mustUnderstand属性为true的Header block时有意义,该Header block将被保留在SOAP消息中,并向前转发给下一个SOAP node。

 

五       SOAP中间节点生成的SOAP消息

SOAP中间节点必须按照第三部分所描述的方式处理其收到的SOAP消息,并按以下方式生成一个新的SOAP消息,并将其向前传递给下一个SOAP node。
Remove all processed SOAP header blocks.

Remove all non-relayable SOAP header blocks that were targeted at the forwarding node but ignored during processing.

Retain all relayable SOAP header blocks that were targeted at the forwarding node but ignored during processing.

Insert or reinsert some header blocks if the soap intermediary determined to do that. The header blocks that were inserted or reinserted might be indistinguishable from one or more of the header blocks removed by the intermediary. Processing is defined here in terms of re-inserting header blocks (rather than leaving them in place) to emphasize the need to process them at each SOAP node along the SOAP message path.

 

时间: 2024-09-14 00:31:42

SOAP学习笔记(1)的相关文章

Web Service学习笔记:动态调用WebService

原文:Web Service学习笔记:动态调用WebService 多数时候我们通过 "添加 Web 引用..." 创建客户端代理类的方式调用WebService,但在某些情况下我们可能需要在程序运行期间动态调用一个未知的服务.在 .NET Framework 的 System.Web.Services.Description 命名空间中有我们需要的东西. 具体步骤: 1. 从目标 URL 下载 WSDL 数据. 2. 使用 ServiceDescription 创建和格式化 WSDL

JetSpeed学习笔记(一)

笔记 JetSpeed学习笔记(一) fuweilin 2005-4-7 前言 参加了公司的portal的兴趣小组,今天对portal进行学习.首先上网看了看一些portal的资料,对portal.portlet.portlet container以及JSR168等概念有个基本的了解.决定进一步实战的方式感受portal,于是学习JetSpeed.     1.  JetSpeed介绍JetSpeed是Apache组织开发的一个采用Java和XML的开放源代码的企业信息门户的实现.门户可以让终端

PHP输入输出流学习笔记

  这篇文章主要介绍了PHP输入输出流学习笔记,PHP输入和输出流是通过php://来访问的,它允许访问 PHP 的输入输出流.标准输入输出和错误描述符,内存中.磁盘备份的临时文件流以及可以操作其他读取写入文件资源的过滤器,需要的朋友可以参考下 PHP输入和输出流是通过php://来访问的,它允许访问 PHP 的输入输出流.标准输入输出和错误描述符, 内存中.磁盘备份的临时文件流以及可以操作其他读取写入文件资源的过滤器. php://stdin, php://stdout 和 php://std

PHP学习笔记 (1) 环境配置与代码调试

一配置PHP环境 1.了解什么是PHP PHP("PHP: Hypertext Preprocessor",超文本预处理器的字母缩写) PHP,是英文超级文本预处理语言Hypertext Preprocessor的缩写.PHP 是一种 HTML 内嵌式的语言,是一种在服务器端执行的嵌入HTML文档的脚本语言,语言的风格有类似于C语言,被广泛的运用 2.PHP的背景和优势 PHP的发展背景 1).1994年由Rasmus Lerdorf创建,开始是一个简单的Perl语言编写的程序,用统计

Node.js 学习笔记之简介、安装及配置

 本文是Node.js学习笔记系列文章的第一篇,主要给大家讲解的是在Windows和Linux上安装Node.js的方法.软件安装版本以0.12.0为例.希望大家能够喜欢.     简单的说 Node.js 就是运行在服务端的 JavaScript. Node.js 是一个基于Chrome JavaScript 运行时建立的一个平台. Node.js是一个事件驱动I/O服务端JavaScript环境,基于Google的V8引擎,V8引擎执行Javascript的速度非常快,性能非常好. 谁适合阅

node.js学习笔记(9) 和谐模式

众所周知,ECMAScript 是一种开放的.国际上广为接受的脚本语言规范. 它本身并不是一种脚本语言.正如在 Web 应用程序中执行有用操作的 bean 集合(例如,Netscape 的 AWT)是 Sun 的 JavaBean 规范的一种实现一样,JavaScript 是 ECMAScript 规范的一种实现. 2015年6月17日,ECMA国际发布了EcmaScript2015,即EcmaScript6(以下简称ES6)草案的正式版.ES6是继ES5之后的一次主要改进,语言规范由ES5.1

php5学习笔记(转)

php5|笔记 作者: whhwq在phpv.net看到的感觉不错/*+-------------------------------------------------------------------------------+| = 本文为Haohappy读<<Core PHP Programming>> | = 中Classes and Objects一章的笔记 | = 翻译为主+个人心得 | = 为避免可能发生的不必要的麻烦请勿转载,谢谢 | = 欢迎批评指正,希望和所有

动态网页学习:JSP学习笔记全记录

js|笔记|动态|网页 JSP学习笔记(一)-----概述 JSP学习笔记(二)-----使用Tomcat运行JSP文件 JSP学习笔记(三)-----使用JSP处理用户注册和登陆 JSP学习笔记(四)-----JSP动作的使用 JSP学习笔记(五)-----JSP中使用JavaBean JSP学习笔记(六)-----在多个JSP页面之间传递参数 JSP学习笔记(七)-----猜数字游戏 JSP学习笔记(八)-----include的运用 JSP学习笔记(九)-----JSP标签库

java对象序列化学习笔记

java对象|笔记 目前网络上关于对象序列化的文章不少,但是我发现详细叙述用法和原理的文章太少.本人把自己经过经验总结和实际运用中的体会写成的学习笔记贡献给大家.希望能为整个java社区的繁荣做一点事情.    序列化的过程就是对象写入字节流和从字节流中读取对象.将对象状态转换成字节流之后,可以用java.io包中的各种字节流类将其保存到文件中,管道到另一线程中或通过网络连接将对象数据发送到另一主机.对象序列化功能非常简单.强大,在RMI.Socket.JMS.EJB都有应用.对象序列化问题在网