`
wonderfan
  • 浏览: 14081 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
最近访客 更多访客>>
社区版块
存档分类
最新评论

J2EE WITH SOAP

阅读更多
the soa provide a powerful framework for building next-generation applications. the p2p approach differs from the soa in

that no attempt is made to define explicit roles, and node or peer can operate in any role it knows about or can discover

through other peers on the p2p network. actually, the document exchange model is the default method of exchanging data

between two endpoints. an rpc call is a specialized case of combining multiple one-way asynchronous messages into a

request-response. the sopa specification describes four major components: formattting conventions for encapsulating

data and routing direction in the form of an envelpoe ,a transport ot protocol binding, encoding rules and an rpc

mechanism. the envelope defiens a convention for describinf the content of a message, which in turn has implications on

how it gets processed. a protocol binding provide a generic mechanism for sendinf a soap envelope via a lower-level

protocol such as http.  encoding rules provide a convention for mapping various application datatypes into an xml tag-

based representation. finally, the rpc mechanism provides a way to represent remote procedure calls and their return

values. a soap envelope contains two primary components: a header and a body, both the header and the body can

contain multiple blocks of information. the namespace declaration prevents tag name conflicts when xml fragements are

combined to form composite documnets. it is analogous to the use of the package keyword in java. the additional

information needed by the protocol that it is bound to. these special urls point to apache's routing and dispatching

mechanism. this mechanism looks at the content of the soap envelope and decides which class to load and which method

to call within the class. apache refers to this destination as a service. the service is registered with the servlet engine in a

two-step process. first , an xml deployment descriptor is created,specifying detailds about the class name of service.,its

associated method call and the target uri, then a special org.apache.soap.server.servermanagerclient class is invoked to

register the service with apache soap. using the rpc router ,any java class and method can be registered as a service; the

apache soap infrastructuer will call the method with the appropriate parameters.

soap-rpc defines a model for representing an rpc and an rpc response using the soap infrastructure.when soap-rpc is

bound to http, an rpc invocation maps naturally to an http request, and an rpc return maps naturally to an http response.,but

this natural mapping is purely conincidental. soap encoding is a set of rules that designates how datatypes are encoded or

serialized over the wire. an identifier might specify the location of a resource or its name independent of location. a

universal reource identifier is a generic representation that can either be a universal resource locator or universal resource

name. a url is something that represents a physical network location and contains things that pertain to a particular

protocol.  a urn is something that does not necessarily resolve to any physical location;generally it is intended to be used to

identigy something uniquely such as a soap action or a namespace.

wsdl is an xml grammar for describing a web service as a collection of acces endpoints capable of exchanging messages

in a procedure or document-oriented fashion. a wsdl document is a recipe used to automate the details involved in

application -to application communication. wsld can be used to describe endpoints and their messgaes,regardless of the

message format or network protocol used to exchange them. treat messages as abstract description of the data being

exchanged; treat  port types as abstract collections of a web service operations. a port type can then be mapped to a

concrete protocol and data format. wsdl has created separate definitions and terminology for defining a web service, the

communication endpoint where that web service exists, the legal format for ipput and output message for the webservice

and an abstract way to declare a binding  to a concrete protocol and data format.
the <definitions> element in a wsdl document acts as a container for the service decription. it provides a place to do global

declarations of namespaces that are intended to be visible throughout the rest of the document. the targetnamespace

attribute of the <definitions> element defines the namespace definition that this document is creating. the <import>

element serves a purpose similar to the #include directive in the c/c++ programming lanuage. it lets you separate the

elements of a service definition into independent documents and include them in the main document. effective use of the

<import> elements promotes the modularization of wsdl documents and creates an environment of reuse that can create

clear service definitions. the <types> element in a wsdl document acts as a container for defining the datatyoes used in

<message> elements .<message> elements define the format of messages interchanged between a client and a web

service. the <message> element is used to model the data exchanaged as part of a web service.<message> elements

reference the types defined in the <type> section. the data contained within a <message> element typed  by a <message>

element is abstract. a message consists of one or more <part> subelements. a <part> subelement identifies the individual

pieces of data that are part of this data message and the datatypes that the pieces adhere to. the <portType> element

specifies a subset of operatipns supported for an endpoint of a web service. in a sense, a <porttype> element provides a

unique identifier to a group of  actions that can be executed at a single endpoint. the <operation> element represents an

operation. this element is an abstract definition of an action  supported by a web service. a wsdl <operation> element is

analogous to a java method definition. a wsdl  operation can have input and output message as part of its action.a

<binding> element is a concreate protocol and data format specification for a <porttype> element. it is where you would

use one of the standard binding extensions -http, soap, or mime or create one of your own. each protocol has its own wire

format. a <service> elements is iused only when desribling the actual endpoint of a service.
a web service is a groupring of  one or more <port> elements. a <port> elements represents a single endpoint for the

webservice.
the uddi project also defines a set of xml schema definitions that describe the data formats used by the various

specification api. two apis are described by the uddi specification: the inquiry api and the publishing api. they are

accessed using the same techniques  but use different xml document, data structures and access points. the inquery api

locates information about a business the services a business offers ,the specification of those services and the

information about what to do in a failure situation.  the publishing api is used to create ,store or update information located

in a uddi registry. all functions in this api require authenticated access to a uddi registry; the uddi registry must have a

logon identity and the security credential for this identity must be passed as a parameter of the xml document for each uddi

invocation. the programmer's api identifies the structure of the request and response messages paying particular attention

to the input parameters for every request messgae. when doing any development with uddi, you should keep a copy of

these two documents. jaxr is a uniform approach to accessing a registry that advertise business information and servcices

in xml. jaxr attempts to provide a single api that can access many difference kinds of registries including eco framework

,ebxml and uddi. wsdl is  used to describe the interface of a web service. <tmodel> uddi documents provide metadata

descriptiomns of a web service and pointers to specifications that describe their implementation .

jaxm consists ofd two main areas. the messaging capability provide a patternfor sending and receiving soap messages.,

with or without attachment. the soap packaging part provide s apis for constructing and deconstructing soap and mime

envelopes. generally, the functionality is separated cleaniy between the javax.xml.messaging package and javax.xml.soap

packages.  a java code generation model for client-side stubs and server-side tie classes based on a set of conventions

for mapping wsdl to java and java to wsdl.
soap is a wire protocol that can be layered upon other protocols such as http ,ftp and smtp. j2ee support these internet protocols through servlets. servlets are respnosible for extracting the soap contents from other wire packet.
分享到:
评论

相关推荐

    学习J2EE

    2. **SAAJ(SOAP with Attachments API for Java)** - SAAJ规范提供了处理SOAP消息的API,支持SOAP1.1和1.2规范的消息处理,特别适用于处理带有附件的SOAP消息。这为开发者提供了一套完整的工具集,用于创建、读取...

    J2EE Web Services: XML SOAP WSDL UDDI WS-I JAX-RPC JAXR SAAJ JAXP

    8. **SAAJ(SOAP with Attachments API for Java)**:SAAJ是Java中处理SOAP消息的标准API,支持SOAP附件和MIME编码,允许在SOAP消息中传输二进制数据,如图像或文档。 9. **JAXP(Java API for XML Processing)**...

    EAI System Design of B2B Enterprises in J2EE Combined with Web Technologies

    2. **SOAP(Simple Object Access Protocol)**:虽然相对于REST来说更加复杂,但SOAP提供了更强大的安全性保障和事务处理能力,适用于对安全性和事务一致性有更高要求的场景。 3. **HTML5/CSS3/JavaScript**:用于...

    Designing Web Services with the J2EE 1.4 Platform

    经典的webservice书籍,可惜没有中文的 Addison-Wesley - Designing Web Services with the J2EE 1.4 Platform - JAX-RPC, SOAP and XML Technologies

    Java SOAP协议

    为了更好地理解本文内容,读者应当对SOAP 1.1的基本规范有初步了解,并具备一定的J2EE开发经验。 #### 二、SAAJ与JAXM简介 **SAAJ**:SOAP with Attachments API for Java是Java世界中用于处理带有附件的SOAP消息...

    Building Service Oriented Architectures (SOA) with the J2EE Platform

    - **SOAP**:简单对象访问协议,用于发送和接收消息的标准协议。 - **UDDI**:通用业务数据集成,用于查找服务的目录。 - **真正的实施与操作系统独立性**:Web服务不受具体的实现细节或操作系统的影响。 #### 八、...

    J2EE1.4AndAdvancedFeatures_CChanV4.pdf

    - **SAAJ 1.2 (SOAP with Attachments API for Java)**:用于构建和处理带有附件的SOAP消息。 - **JAXR 1.0 (Java API for XML Registries)**:支持在企业环境中查找和管理元数据及服务描述。 - **J2EE Management ...

    中国科学技术大学J2EE课件

    10. **1_2 Working with Java classes.ppt**:这一章可能涵盖了面向对象编程的要点,如类、对象、继承、封装和多态,这是理解J2EE组件模型的基础。 通过这些课件的学习,学生可以全面掌握J2EE开发的基本技能,理解...

    Understanding Web Services - XML, WSDL, SOAP, and UDDI

    随着时间的推移,IONA持续在Web服务领域发力,不仅支持了SOAP提交至W3C,还参与了WSDL、带有附件的SOAP(SOAP with Attachments)以及XKMS(XML Key Management Specification)等重要标准的制定。IONA在Web服务架构...

    Java.EE.7.Development.with.NetBeans.8

    Title: Java EE 7 Development with NetBeans 8 Author: David R. Heffelfinger Length: 362 pages Edition: 1 Language: English Publisher: Packt Publishing ...Chapter 11: SOAP Web Services with JAX-WS

    Spring 实践(Spring in Practice).pdf版本

    wide variety of third-party libraries—proved to be more effective than J2EE with EJB. JEE closed the gap by adopting key elements of that approach. That Spring simplifies development without itself ...

    Understanding.SOA.with.Web.Services中文版(Eric Newcomer原著,徐涵译)2分之2

    - 通信基础设施:主要包括基本的“SOAP over HTTP”和WS-ReliableMessaging的SOAP通信方式。 - 业务服务访问层:包含用于服务注册与服务查找的服务注册库(如UDDI)以及用于IMS、CORBA及WebSphere MQ的传统网关。 -...

    java学习方向.pdf

    Web Service技术包括Java API for XML Processing(JAXP)、Java API for XML Registries(JAXR)、Java API for XML-based RPC(JAX-RPC)、SOAP with Attachments API for Java(SAAJ)等。组件模型技术包括Java ...

    webservice

    SAAJ (SOAP with Attachments API for Java) - **定义**:SAAJ是一组处理SOAP消息的API,支持创建和读取符合SOAP 1.1规范的消息。 - **应用场景**:不仅被JAX-RPC使用,也被其他WebService技术所利用。 ##### 4. ...

    jdk1.6与jboss5.x冲突问题的解决方法

    这些JAR包包含了JBoss对Java API for XML Web Services (JAX-WS)和SOAP with Attachments API for Java (SAAJ)的实现。JAX-WS用于创建Web服务,而SAAJ则用于处理SOAP消息。将这些库放入`endorsed`目录是因为它们会...

    DesigningWebServicesWithJ2EE.chm

    《Designing Web Services with J2EE》是一本深入探讨如何使用Java 2 Enterprise Edition (J2EE) 平台设计Web服务的专业书籍。通过提供的博客链接(https://sbiigu.iteye.com/blog/255751),我们可以推测这可能是一...

    EJB 2.1中实现Web Service.doc

    其次,SAAJ(SOAP API with Attachments for Java)则专注于处理带有附件的SOAP消息。SAAJ模仿SOAP消息的结构,并提供有限的消息分发能力,允许在EJB中处理复杂的数据交换。 再者,JAXM(Java API for XML ...

    如何学习java如何学习java.doc

    - **SAAJ**:SOAP with Attachments API for Java,处理SOAP消息和附件。 2. **组件模型技术**: - **Servlet**:JavaServer Pages,用于生成动态网页内容的服务器端技术。 - **JSP**:JavaServer Pages,结合...

Global site tag (gtag.js) - Google Analytics