Use J2EE to establish XML-based network services (3)

zhaozj2021-02-17  48

3.1.1 Soap When a business partner is looking for your WSDL description with UDDI, they can use SOAP (Simple Object Access Protocol) to call your network service one or more operations. SOAP supports a series of underlying protocols such as HTTP (S) and SMTP, which can be requested by XML documents. Using XML is because it is a language-independent, scalable and solid industrial standard support. Using HTTP is because any system that can connect Internet can communicate on ports, it is a protocol that is interacting with any system, and it can use the No. 80 port to be set via firewall settings. The power of SOAP comes from its simple. SOAP is lightweight and it is easy to understand and easy to implement. It is based on industrial power and is supported by all large e-commerce platforms. From a technical perspective, SOAP specifies how various call transaction tablets ("Call AdministriVia" also specifies how to encode parameters. A SOAP envelope encapsulates an optional head and subject information. It typically interacts with HTTP servers via HTTP, or other forms can be transmitted (such as SMTP). SOAP supports the semantics of messaging and RPC calls.

Below is a transmitted SOAP call:

Post / stockquote http / 1.1host: www.stockquoteserver.comcontent-type: text / xml; charset = "UTF-8" Content-Length: nnnn soapaction: "Some-URI"

5 Sunw

3.1.2 JAX / RPC In order to help developers build XML-based requests, JCP is developing Java APIS for XML Based RPC (JAX / RPC). JAX / RPC is used to send and receive process calls such as SOAP or XMLP (XML Protocol, in http://www.w3.org/2000/xp/). JAX / RPC makes you from various agreements Survey in the full development, it provides a rapid development method. This will not process the XML documentation directly. There are many third-party SOAP implementations. Developers can develop, and a wide API will be developed. Wrapped. In place in the future, JAX / RPC replace these APIs, providing a unified interface based on various implementations. JAX / RPC provides a unified interface to establish and process RPC calls and automatically convert input and output parameters. When from business partners When you receive a SOAP request, a Java Servlet uses JAX / RPC to receive XML-based requests. Once requests are received, servlet is handled and returned to business partners. 3.1.3 Ebxml For more business interactions, you need to be commercial The structure of interaction, multi-request transmission, outline (Schemas) and document streams are reached. Although SOAP provides you can build a base of the expansion commercial interaction, you may need a advanced framework to solve these above. These questions. These It is the purpose of EBXML, EBXML is an XML specification and related processing and behavior, which is designed to provide B2B collaborative and integrated basic architecture. It is a comprehensive specification that can accept partners for merchants and guided business operations Bringing innovation. Below is a key component of the EBXML standard. Collaboration Protocol Profile (CPP) CPP Description A company provides a standard, portable solution. Special, it describes the ability of a company supported message interaction and Commercial collaboration. It also describes the company's business schedule, including how partners interact with the company. A fun face on CPP is that commercial cooperation includes two sides of B2B transmission. For sale, CPP can describe more than sales schedule and sales The semantics of the merchants, and also describes the progress of the purchase and the semantics of the buyer.

Collaboration Protocol Agreement (CPA)

CPA describes the precise mechanisms and needs of two companies interaction. It is manually or automatically established by the relevant part of CPP, which is reviewed and reached by both parties. The CPA has become the contract between the two parties, which specifies the protocol in a particular cooperation ("Rules of Engagement").

Examples and details of CPP and CPA can be found in the following address:

Http://ebxml.org/project_teams/trade_partner/cpp-example.xml

http://ebxml.org/project_teams/trade_partner/cpa-example.xml

http://www.ebxml.org/specs/ebccp.pdf

Business Process and Information Modeling

EBXML also includes a specific solution for describing business progress with XML. It includes transmission, document stream, binary cooperative data package format and more. These specifications are also used by authors and shared commercial progress and information formats when establishing CPP.

Core Components

Another vital part of the EBXML standard is a series of XML Schema, also called core components. These Schema include format of commercial data, such as dates, total taxes, account owners, exchange contracts, and more. They are specific commercial architectures and entities, but they don't rely over any vertical industry.

Message (Messaging)

EBXML Message Transfer is the format of the message with all related intermediates semantics (eg synchronous / asynchronous, reliable option). In particular, an EBXML message transmits a function of a visible CPA, also has the characteristics of the specified solution to enhance the rail ("rules of engagement"). EBXML messaging is based on the message transfer call (relative to RPC style call) on the SOAP package. It adds a hierarchical frame to support accessories, security, and reliably to extend the SOAP protocol. Registry / Knowledge Base (Registry / Repository)

EBXML registry / Knowledge Base is a service that stores CPP, CPA, EBXML core components, and other EBXML documents and blocks, which includes powerful query capabilities to help users search for related components and substantive business partners. The JAXR API can also be used to access the EBXML registry. The commercial service stored in the EBXML registry can be released to UDDI. A key concept is UDDI to provide a global single reference source, while the EBXML knowledge base provides a partial internal data storage container. Therefore, in WAN service semantics, an actual business partner will first find UDDI services, which includes reference information that actually stores CPP or other documents in the EBXML Knowledge Base.

3.1.4 JAXM When you receive a network service request from a business partner, in our servlet, as we use the JAX / RPC to process the SOAP request, we need a Java API to process EBXML information. The Java API for XML Messaging (JAXM) is a specification that will be developed, which is used for XML message standards such as EBXML messages and SOAP messages. This API is designed to assist the XML message protocol, especially for where the originally defined "contract" (EBXML is a special case) to determine the message format and message constraint. This API will process all "Envelope" information. For example, the process information in the message. This allows developers to focus on interaction of payload and ignore other fine branches. Although developers can now use JAXP to implement JAXM will provide features, JAXM provides an API set dedicated to XML-based messages. It will simplify tasks and generate a unified and standard interface for such code. The difference between JAXM and JAX / RPC is like a message-oriented middleware (MOM) and remote procedure call (RPC). JAXM is adjusted for intermediate applications for messages, while JAX / RPC is specifically designed for RPC behavior. Figure 4 shows JAX / RPC and JAXM.

Figure 4 In a servlet.m, using JAXM and JAX / RPC notice that developers will rely on third-party SOAP APIs, such as Apache SOAP, IDOOAP and GLUE prior to JAXM and JAX / RPCs. When JAXM and JAX / RPC are released, they should provide a unified interface to implement a variety of SOAP and EBXML messaging. This is similar to how JDBC provides a unified interface to access traditional database engines. At this point, we have completed the discussion of our service to your service, below, we will discuss the connection of thin customers and fertilizers.

转载请注明原文地址:https://www.9cbs.com/read-30471.html

New Post(0)