JBUILDER9 in Web Service Introduction

zhaozj2021-02-16  50

JBUILDER9 in Web Service Introduction

WebService is a software model that calls, executes sequencing or continuous tasks over the network, in particular Internet.

Developers can create a client application call a series of Web services that delivers some or most application logic through RPC or message services. Developers can locate a released web service that uses it as needed.

An example is a company that provides a Web service to it, allowing customers to check the stock of the product before the issuance. Another example is that customers can track their courier with the web services provided by FedEx.

Web services use SOAP (Simple Object Access Protocol) to exchange SOAP messages with transport protocols such as HTTP. SOAP messages are in fact a XML document, passed in web services and calls.

Web services can be written in any language and run on any platform. The client of the web service can be written in any language and can be run on any platform. For example, a Web service written on a Windows platform can be written in Java on a Linux platform with a Web service written in a Linux platform.

Web service architecture

The web service architecture allows the developer of the service to expose all levels of business features. In other words, a web service can be very simple, such as returning the current temperature, or a complex application. The architecture also allows multiple services to combine a new feature application.

Web services have three independent roles, service providers, service requesters, service agents. Service providers create services and provide to client applications. Service requesters may also be customers with multiple services. Agents, providing a way such as service registration, allowing service providers and service requestors to interact to services.

Three roles interact through the release, lookup, and binding of the service. The service provider notifies the agent service by allowing customers to access services with the agent's publishing interface. Publish information describes the service and describes where the service is positioned. Services requested the positioning of the agent service. The requester can bind or call this service based on the service information obtained from the agent. The figure below summarizes how the three interacts.

Web service standard

WEB services development based on standards include some technologies. The main thing is SOAP, WSDL (Web Service Description Language), UDDI (General Description, Discovery, Integration), and WSIL (Web Service Checklook).

SOAP

SOAP is an independent transfer message protocol. Each SOAP message is an XML document. SOAP uses a single way message, although it may be composite a queue requesting a reply. The SOAP specification defines the format of the XML message, specifically it is easy to HTTP protocol routing, but there is no specification that it is in fact how it is actually passed.

Each SOAP document has a root element. This root element, the first element in the document, contains all other elements in the document. There are two parts: message heads and messages in . The message header contains route or content data, which may be empty. Messages include actual messages or empty.

Below is a simple SOAP message example, current Borland stock prices through HTTP.

POST / stockquote http / 1.1

Host: www.stockquoteserver.com

Content-type: text / xml; charSet = "UTF-8"

Content-Length: nnnn

SOAPACTION: "URN: Stock-Quote-Services"

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/>

Borl

For more information about SOAP, please see the SOAP document of the URL below: http://www.w3.org/2002/ws/ ,http: //xml.apache.org/SOAP/

Web Service Description Language (WSDL)

If a web service cannot be discovered and called, then this web service has no meaning. Developers must know enough information for Web services to write a client call. WSDL is based on XML-based, which is used to define how Web service shows how to access it. In particular, it illustrates messages and data agreed by the Web service. What method calls can be called by checking a web service WSDL, and how to call with appropriate parameters.

More in-depth understanding, please see WSDL1.1 specification: http://www.w3.org/tr/wsdl

General Description, Discovery and Integration (UDDI)

UDDI is a development standard for describing, publishing and discovering web services of business developers. It is a specification for distributed registration information for web services. Once a web service is developed, a WSDL describes its documentation will be built, it is necessary to get this WSDL information if the user wants to use the Web service it describes. When a web service is published through UDDI registration, potential users have a way to parse and learn about the existence of this web service.

UDDI registered content close to the phone path. In the registered white page, it is information such as name, address, and service. Provide one or more web services. Distinguish business type and business classification in the yellow page. Provides data about the service providing web services in the green page.

For more information, please see http://www.uddi.org

Web Service Check Language (WSIL)

WSIL is like UDDI, providing a method of discovering a Web service. Unlike UDDI centralized models, WSIL uses a discrete, distributed model, and WSIL document allows Web services to browse available Web services on the website.

The WSIL specification provides a Web service site and a range of rules for this information with XML format documents. In one document, a WSIL document collects multiple references for a pre-stored service description document. The WSIL document is a service that resides in the service provider in order to manage the relevant services.

More about WSIL, please see

Http://www-106.ibm.com/developerWorks/webservices/library/ws-wsilspec.html.

Java Apis for XML-BASED Remote Procedure Call (JAX-RPC)

JAX-RPC defines the Java developer's Java application interface used in their development and application web services. A Java client can apply a web service on a remote server on the Internet, even if this service is in another platform, in another language. A JAX-RPC service can also be applied by non-Java clients.

JAX-RPC communicates with an XML message protocol, such as SOAP, passes a remote process call through the network. For example, a Web service returns a stock query will receive a SOAP HTTP request called by the client. With JXA-RPC, the service will unlock the method call from the SOAP message, convert it into method call, then call it. Then, the service is converted to SOAP with JAX-RPC to return the result to the client. The client receives the SOAP message and converts with JAX-RPC into a reply. JAX-RPC is running Stubs and Ties that allow customers and service communications. A Stub is on the client, represents a remote service, as a service agent. A Tie, at the server side, as a server-side agent.

For more information, please see

Http://java.sun.com/xml/jaxrpc/index.html http://java.sun.com/webservices/docs/1.0/tutorial/doc/jaxrpc.html.

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

New Post(0)