this section describes message exchange patterns defined in WSDL Version 2.0 Part 2: Adjuncts - In-Only, Robust In-Only, and In-Out.
What Is a WSDL Message Exchange Pattern? A WSDL message exchange pattern is a predefined sequence of in/out message of an operation in an abstract interface. Each pattern is represented by a unique URI, which can be specified as the "pattern" attribute of an operation.
WSDL 2.0 specification (WSDL Version 2.0 Part 2: Adjuncts) provides 3 predefined patterns: In-Only, Robust In-Only, and In-Out.
1.
In-Only, represented by URI: http://www.w3.org/ns/wsdl/in-only - In-Only pattern defines only 1 single message that goes into the service provider of this operation. This message label is "In" and direction is "in". In-Only pattern does not allow any fault messages. Here is an example operation that uses the In-Only pattern:
<wsdl:operation name="SnowDay"
pattern="http://www.w3.org/ns/wsdl/in-only"
style="http://www.w3.org/ns/wsdl/style/iri">
<wsdl:input messageLabel="In"
element="hy:SnowDayAnnouncement"/>
</wsdl:operation>
2.
Robust In-Only, represented by URI: http://www.w3.org/ns/wsdl/robust-in-only - Robust In-Only pattern defines only 1 single message that goes into the service provider of this operation. This message label is "In" and direction is "in". Robust In-Only pattern needs a fault message in the "out" direction. The fault message will be triggered by the input message, if needed. Here is an example operation that uses the Robust In-Only pattern:
<wsdl:interface name="AlertInterface" >
<wsdl:fault name="invalidEmailFault" element="InvalidEmail"/>
<wsdl:operation name="SendAlert"
pattern="http://www.w3.org/ns/wsdl/robust-in-only"
style="http://www.w3.org/ns/wsdl/style/iri">
<wsdl:input messageLabel="In"
element="hy:AlertEmail"/>
<wsdl:outfault ref="invalidEmailFault" messageLabel="Out"/>
</wsdl:operation>
</wsdl:interface>
3.
In-Out, represented by URI: http://www.w3.org/ns/wsdl/in-out - In-Out pattern defines 2 messages: an input message followed by an output message. The input message is labeled as "In" and has a direction of "in". The output message is labeled as "Out" and has a direction of "out". In-Out pattern needs a fault message in the "out" direction. The service provider may replace the output message by the fault message, if needed. Here is an example operation that uses the In-Out pattern:
<wsdl:interface name="GetQuoteInterface" >
<wsdl:fault name="marketClosedFault" element="MarketClosed"/>
<wsdl:operation name="GetQuote"
pattern="http://www.w3.org/ns/wsdl/in-out"
style="http://www.w3.org/ns/wsdl/style/iri">
<wsdl:input messageLabel="In"
element="hy:GetQuoteRequest"/>
<wsdl:output messageLabel="Out"
element="hy:GetQuoteResponse"/>
<wsdl:outfault ref="marketClosedFault" messageLabel="Out"/>
</wsdl:operation>
</wsdl:interface>
Some Web sites include other message exchange patterns like In-Optional-Out, Out-Only, Robust Out-Only, Out-In, Out-Optional-In, etc. as part of the WSDL 2.0. But I can not find them in the WSDL 2.0 2007 specification.
2007年推出wsdl2.0
分享到:
相关推荐
每个WSDL文件内部会详细描述每个服务的端点(Endpoint)、消息交换模式(Message Exchange Patterns)、操作(Operations)以及它们所使用的数据类型(Schema)。开发人员可以通过解析这些文件来构建客户端应用程序...
这包括理解WSDL文件结构,如何定义服务端点(Endpoint),消息交换模式(Message Exchange Patterns),以及如何通过WSDL来规范服务请求和响应的结构。 **WSDL基本概念** 1. **WSDL文档结构**:一个WSDL文件通常由...
每个`operation`包含一个或多个消息交换模式(message exchange patterns),描述了服务交互的方式。 解析`portType`元素的过程: 1. **解析WSDL文档**:首先,我们需要读取并解析WSDL文档,通常使用XML解析库来...
在WSDL中,这些对应于消息交换模式(message exchange patterns)。 - **URI和路径**:REST服务的地址通常包含路径来标识资源,而在WSDL中,服务和端点的定义可能需要特别处理以匹配这些路径。 - **状态管理**:REST...
3. **接口(Interface)**:定义了服务提供的操作集合,这些操作是由消息交换模式(Message Exchange Patterns,MEP)定义的。 4. **消息(Message)**:描述了在服务操作中传输的数据结构。 5. **类型(Types)**:...
学习Axis2不仅涵盖了Web服务的基本概念,还包括了高级特性如异步服务、MTOM(Message Transmission Optimization Mechanism)和MEP(Message Exchange Patterns)支持,以及如何利用Axis2的模块化结构来优化和扩展...
7. **Message Exchange Patterns(MEP)** SOAP1.2定义了多种消息交换模式,如单向、请求-响应、双向等,为不同类型的通信场景提供了灵活的选择。 8. **编码规则** SOAP1.2规定了如何将数据编码成XML,以便于传输...
Web Service的消息交换模式(Message Exchange Patterns, MEPs)描述了服务如何接收和发送消息。常见的MEPs包括请求-响应、单向、双向和回调等。 学习燕青的WebService笔记,将有助于理解Web Service的工作原理、...
JBI构件之间的交互基于WSDL 2.0定义的消息交换模式(Message Exchange Patterns, MEP),这四种MEP是JBI构件进行交互的基础。 消息路由器在JBI容器中具有重要作用,它为消息传递提供了基础支持,包括消息的发送、接收...
6. **MEP支持**:完全支持WSDL2.0中的消息交换模式(Message Exchange Patterns),提供了良好的可扩展性。 7. **灵活性**:通过其模块化架构,开发人员可以轻松地为Axis2添加自定义扩展。 8. **稳定性**:定义了一...
1. **Web Services**: 通过SOAP(Simple Object Access Protocol)和WSDL(Web Services Description Language)定义的服务接口,使得.NET和J2EE应用可以作为Web服务消费者和提供者,实现跨平台的数据交换。...