WEB开发网
开发学院软件开发Java 在 WebSphere Application Server V7 中为 WS-Add... 阅读

在 WebSphere Application Server V7 中为 WS-Addressing 提供 JAX-WS 2.1 支持

 2010-07-26 00:00:00 来源:WEB开发网   
核心提示: 清单 6. EndpointReferenceManagerimportjavax.xml.namespace.QName;importcom.ibm.websphere.wsaddressing.EndpointReferenceManager;QNamename=...StringrefPa

清单 6. EndpointReferenceManager

  
import javax.xml.namespace.QName; 
import com.ibm.websphere.wsaddressing.EndpointReferenceManager; 
 
QName name = ... 
String refParam = 
  EndpointReferenceManager.getReferenceParameterFromMessageContext(name); 

Feature

JAX-WS 2.1 还引入了 feature 概念。一个 feature 就是指一种允许客户端开发人员通过编程方式控制客户端具体行为的机制。所有 feature 都来自 WebServiceFeature 类。这允许客户端开发人员将不同类型的 WebServiceFeature 传递给需要它们的客户端 API。与 WS-Addressing 有关的 feature 如图 2 所示。

图 2. WS-Addressing Feature
在 WebSphere Application Server V7 中为 WS-Addressing 提供 JAX-WS 2.1 支持

AddressingFeature 用于控制 WS-Addressing 的使用。它允许开发人员启用/禁用客户端对 WS-Addressing 的使用。如果启用了 WS-Addressing,客户端将在要发送的 SOAP 消息中包含 WS-Addressing 头。这些头将位于 WS-Addressing 1.0 Core 规范名称空间 http://www.w3.org/2005/08/addressing 中。如果禁用 WS-Addressing,那么不会发送任何 WS-Addressing 头。

在 WebSphere Application Server V7 中,我们还提供一个 SubmissionAddressingFeature 类。该类与 AddressingFeature 的工作方式相同,惟一不同之处是如果它得到启用,那么由客户端发送的任何 WS-Addressing 头都将位于 WS-Addressing Member Submission 规范名称空间 http://schemas.xmlsoap.org/ws/2004/08/addressing 中。在 WebSphere Application Server V7 中,可以使用其他机制启用客户端中的 WS-Addressing 支持,但是这不属于本文的讨论范围。请参见参考资料部分,获得介绍这些机制的相关链接。

上一页  1 2 3 4 5 6 7 8 9 10  下一页

Tags:WebSphere Application Server

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接