Web Service概念和术语

Web Service概念和术语

一. Web Service基本的概念

XML (eXtensible Markup Language)

       XML is used to organize documents and business data. XML files can be stored or transmitted between two applications on a network. Basically, they are just plain text documents that contain special tags that label different parts of a document or fields of data.

       XML是一种由规范定义的元语言。XML标记语言定义了一套用来组织和描述文本的标记(tag)。标记通常成对出现,其中一个标记是开始标记,另一个标记是结束标记。位于这两个标记之间的所有内容均成为元素。

SOAP (Simple Object Access Protocol)

       SOAP defines a standard packaging format for transmitting XML data between applications on a network. A SOAP message is just an XML document. SOAP is specially designed, however, to contain and transmit other XML documents as well as information related to routing, processing, security, transactions, and other qualities of service.

       SOAP消息是一种XML文档,它有其自己的XML模式、命名空间和处理规则。目前的版本是SOAP 1.2。

WSDL (Web Services Description Language)

       WSDL is a standard for describing the structure of the XML data exchanged between two systems using SOAP.

       WSDL是一个用于精确描述Web服务的文档格式,它用来指定客户与具体的Web服务通信时必须使用的确切的消息格式、Internet协议以及地址。目前的版本是WSDL 2.0

UDDI (Universal Description, Discovery, and Integration)

       UDDI defines a standard set of Web service operations (methods) that are used to store and look up information about other Web service applications. In other words, UDDI defines a standard SOAP-based interface for a Web services registry. You can use a UDDI registry to find a particular type of Web service, or to find out about the Web services hosted by a specific organization. A UDDI registry is often referred to as a "Yellow Pages" for Web services. The UDDI specification is now maintained by the Organization for the Advancement of Structured Information Standards (OASIS)

       UDDI定义了一套标准的Web服务操作方法,用于存储、查找有关其他Web服务应用程序方面的信息。

WS-I BP (Web Services Interoperability Basic Profile)

Web Services Interoperability Organization is an organization of Web services vendors that are committed to defining a standard for Web services interoperability. The first deliverable of the WS-I was the Basic Profile 1.0, 第二个是WS-I Basic Profile 2.0

 

   

二. Web Service Advanced概念 

WS-Addressing

     WS-Addressing specification is to provide the means to identify a Web service endpoint and a way to use such identifiers in SOAP messages for the delivery and exchange of messages between Web service providers and Web service requesters.

     WS-Addressing通过对SOAP消息的扩展,为Web Services的寻址问题提供更强大的支持。WS-Addressing规范主要描述了两个概念:EndpointReference 以及Message Addressing Properties。在Web Services中代表一类逻辑功能的服务实现可能存在不同的Endpoint,每一个Endpoint可能代表了一种不同的绑定方式,甚至对外表现出不 同的接口,比如Endpoint A可能使用TCP协议通讯,而Endpoint B则可能使用Http协议。通过EndpointReferrence我们就可以引用到相应的Endpoint上,从而访问该服 务。             Message Addressing Properties作为SOAP Head的扩展将包含在每一个SOAP 消息中,用于该消息的寻址。 

WS-Policy

      WS-Policy defines a general-purpose framework for representing and combining statements about the quality of service properties. WS-Policy is an extensible framework that can accommodate domain-specific dialects to represent these assertions and allow the attachment of policies to arbitrary types of subjects though the generic attachment mechanisms that WS-Policy Attachments define.

       Web服务策略框架规范(Web Services Policy Framework,WS-Policy ) 提供了一种灵活、可扩展的语法,用于表示基于XML Web services的系统中实体的能力、要求和一般特性。WS-Policy定义了一个框架和一个模型,将这些特性表示为策略。策略表示法既支持简单的声明 式断言,也支持比较复杂的条件式断言。策略断言是要表示行为的个体 要求、能力或其他特性。例如,可以创建一个策略断言,定义这样一个要求: 必须使用受信任的X.509证书签名SOAP消息主体。WS-Policy 提供了一个通用模型和语法,用于描述 Web 服务的策略及就此进行沟通。WS-Policy 断言说明特定 Web 服务的功能和约束。WS-PolicyAttachments 定义了用于将 WS-Policy 表达式与 Web 服务(即 WSDL)关联的若干方法。 

WS-Reliable Messaging

      WS-Reliable Messaging promises to bring the benefits of reliable messaging to SOA and Web services, enabling enterprises to extend Web services to support reliable business-to-business (B2B) exchanges. 

WS-Coordination (WS-AT and WS-BA)

      WS Atomic Transactions Application operations on Web services occur completely or not at all, and results are not available until the transaction is complete.

      WS Business Activity Application operations on Web services exhibit a loose unit of work, in which results are shared prior to completion of the overall activity. Each participant undoes the operations it has performed within the conversation.

      WS-Coordination specification provides the generic foundation for coordinating outcome agreements between interoperating Web services. WS-Atomic Transaction and WS-Business Activity specifications contain definitions of atomic and business transaction protocols, respectively, that you can use with WS-Coordination. WS-Coordination is defined as an extensible framework that can support additional protocols for other coordination patterns as required.

      WS-AT and WS-BA用来定义规范WS的事务。 

WS-Security

     WS-Security SOAP Message Security is optimized for exchanging a small number of messages. A requester might engage in a prolonged "conversation" with a Web service. WS-SecureConversation builds on WS-Trust and message security to provide support for multimessage, long-lived conversations. WS-SecureConversation provides a better level of security and improved efficiency. This chapter also provides an overview of WS-Secure Conversation. 

WS-Trust

     WS-Security supports security tokens. Collaboration between enterprises often requires sharing additional information, such as customer identity information and preferences. WS-Federation extends WS-Trust to provide these functions, and is discussed later in this chapter. 

WS-Authorization/ WS-Privacy

     WS-Authorization and WS-Privacy are in progress.

WS-BPEL

     Web services Business Process Execution Language is an extensible workflow-based language that aggregates services by choreographing service interactions. The aggregation is recursive, such that the process exposes WSDL interfaces to those that interact with it, and the corresponding services may be used in other choreographies.

    BPEL用来描述和规范WS的业务流程.

 

三. J2EE Web Service APIs基本概念

       用来在J2EE平台实现Web Service。包括JAX-RPC, SAAJ, JAXR, and JAXP

JAX-RPC (Java API for XML-based RPC)

      You can think of JAX-RPC as Java RMI over SOAP. JAX-RPC is divided into two parts: a set of client-side APIs, and a set of server-side components, called endpoints .

      The client-side APIs allow you to communicate with Web service endpoints hosted on some other platform. There are three client-side APIs: generated stub, dynamic proxy, and DII (Dynamic Invocation Interface) . The generated stub is the one you will use the most, and its semantics closely resemble those of Java RMI. The dynamic proxy API also follows many of the Java RMI semantics, but is used less often. The DII is a very low-level API used primarily by vendor tools, but can also be employed by Web services developers if necessary.

      The server-side components include the JAX-RPC service endpoint (JSE) and the EJB endpoint . The JSE component is actually a type of servlet that has been adapted for use as a Web services component. The EJB endpoint is simply a type of stateless session EJB that has been adapted for use as a Web service endpoint. The EJB endpoint provides all the transactional and security features of a normal stateless session bean, but it's specifically designed to process SOAP requests. 

SAAJ (SOAP with Attachments API for Java)

      SAAJ is a low-level SOAP API that complies with SOAP 1.1 and the SOAP Messages with Attachments specification. SAAJ allows you to build SOAP messages from scratch as well as read and manipulate SOAP messages. You can use it alone to create, transmit, and process SOAP messages, but you're more likely to use it in conjunction with JAX-RPC. In JAX-RPC, SAAJ is used primarily to process SOAP header blocks (the SOAP message meta-data). 

JAXR (Java API for XML Registries)

      JAXR provides an API for accessing UDDI registries. It simplifies the process of publishing and searching for Web service endpoints. 

JAXP (Java API for XML Processing)

      JAXP provides a framework for using DOM 2 and SAX2, standard Java APIs that read, write, and modify XML documents.

     DOM 2 (Document Object Model, Level 2) is a Java API that models XML documents as trees of objects. It contains objects that represent elements, attributes, values, and so on. DOM 2 is used a lot in situations where speed and memory are not factors, but complex manipulation of XML documents is required. DOM 2 is also the basis of SAAJ 1.1.

      DOM 2在处理XML文档的时候会将所有infoset在内存中创建相应的对象,所以比较消耗内存。

     SAX2 (Simple API for XML, version 2) is very different in functionality from DOM 2. When a SAX parser reads an XML document, it fires events as it encounters start and end tags, attributes, values, etc. You can register listeners for these events, and they will be notified as the SAX2 parser detects changes in the XML document it is reading.

      SAX2是基于push方式,StAX是pull的方式。

Streaming API for XML (StAX)

      StAX is a streaming Java-based, event-driven, pull-parsing API for reading and writing XML documents. StAX provides is the latest API in the JAXP family, and provides an alternative to SAX, DOM, TrAX, and DOM for developers looking to do high-performance stream filtering, processing, and modification, particularly with low memory and limited extensibility requirements.

      StAX is a bidirectional API, meaning that it can both read and write XML documents. SAX is read only, so another API is needed if you want to write XML documents. 

JAX-WS2.0

    JAX-WS2.0即Java API for XML Web Services (JAX-WS) 2.0,JAX-RPC 1.1即Java API for XML-Based RPC (JAX-RPC) 1.1。它们都是Sun公司的使用 Java 技术开发 Web 服务的规范,前者是后者的升级版本。

JAX-WS2.0的binding层用JAXB(JSR 222),xml解析层用StAX(JSR 173),完全基于标准,性能得到大幅提升;支持Java 5的注释(annotation),容易开发。 

Java™Architecture for XML Binding (JAXB)

     JAXB provides a fast and convenient way to bind between XML schemas and Java representations, making it easy for Java developers to incorporate XML data and processing functions in Java applications. JAXB provides methods for unmarshalling XML instance documents into Java content trees, and then marshalling Java content trees back into XML instance documents.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值