WebService (recommended) (happy I particularly optimistic about Webservice)

Source: Internet
Author: User
Tags abstract abstract definition definition file system soap web services xmlns wsdl
A preliminary study on Web Web Service (recommended) <br>
<br>
<br>
<br>
Brief introduction <br>
<br>
Looking back over the last six years, it's hard to imagine what network computing would be like without the Internet. Earlier hypertext patterns failed, and the Internet was successful, and the basic reason for this was that the Internet was simple and ubiquitous. From the point of view of the service provider (such as the online store), you can accept the service as long as you can type. From the point of view of the service API, the vast majority of activities on the Internet can be done by three methods (get, POST, and put) and a markup language. The rise of Web services is based on the fact that the web can serve as an information platform as well as a service platform. <br>
"Services" Here is not a rough service provided by Amazon.com, but a component service that others can use to construct more powerful services. For example, Microsoft offers a Passport service that provides authentication on the web, so electronic newspapers like The Washington Post do not have to develop authentication services on their own, as long as they are delivered to passport. Of course, this is just a hypothesis. <br>
<br>
Oracle's Dynamic Services White Paper (whitepaper) provides examples of additional Component Services: Exchange rate conversion, translation, freight forwarding, and more. IBM has a more formal definition of Web service:<br>
<br>
Web Ervices is a new branch of Web application that is self-contained, self-describing, modular, and can be published, positioned, and invoked via the Web. Web service can perform any function from a simple request to a complex business process. Once deployed, other Web services applications can discover and invoke the services that it deploys. <br>
<br>
The IBM Web Service guide goes on to say that a few years ago, Web service was a concept that was inefficient and could not arouse people's interest. But as bandwidth and storage become cheaper, content is more dynamic, and the integration of a wide range of computing devices on different platforms is more demanding, and it makes people less sensitive to costs (bandwidth and storage). <br>
<br>
Why bother with the web when I already have my favorite middleware platform (RMI, Jini, CORBA, DCOM, and so on)? Middleware does provide a powerful service implementation, but none of them is an absolute winner. The power of the web as a publisher of information is simple and ubiquitous, which is important for solving a fragmented middleware world now. The web provides a unified and widely applicable interface by providing services that are more effectively implemented on traditional middleware platforms, thus improving the platform. <br>
<br>
From the perspective of an N-tier application architecture, the Web service is only a convenient package for program access, and services are implemented by middleware. Access includes service request processing (listener) and an interface that supports business logic operations, and the business logic itself is implemented by the traditional middleware platform. <br>
<br>
WEB Services Platform <br>
<br>
So what is a Web service platform? The most basic platform is XML plus HTTP. HTTP is a protocol that is widely used on the Internet. XML is a meta language that you can use to write specific languages that describe the interactions between customers and services or between components and complex services. After the Web server, XML-formatted messages are transformed into middleware requests, and the returned results are translated into XML format. <br>
<br>
You might ask, is this not the same as saying that CORBA is IDL plus RPC? How does this platform Support service discovery, transaction, security, authentication, and so on, so that it really becomes a platform? Here's what we'll tell you. <br>
<br>
It is necessary to add some services while maintaining simplicity and universality to build the Web into a more powerful platform. A full-featured Web services platform can be considered xml+http+soap+wsdl+uddi. At a higher level, it is possible to add some technologies that have not yet been widely accepted, such as Xaml,xlang, XKMS, and XFS. <br>
<br>
The following is a brief description of these platform elements. It should be noted that these are still developing technologies, and many times there are multiple solutions to a problem. <br>
<br>
SOAP (remote invocation) <br>
UDDI (Trade, directory services) <br>
WSDL (describing service characteristics) <br>
Xlang/xaml (support for complex web transactions that include a variety of Web services) <br>
XKMS (XML Key Management specification)-Support for certification and registration, this work is still in progress <br>
<br>
Soap<br>
<br>
SOAP is a protocol specification that defines a uniform way of passing xml-encoded data. It also defines a method for executing remote calls (RPC) when using HTTP as the underlying communication protocol. <br>
<br>
The rise of soap is based on the realization that no matter how good the middleware is today, they all need a WAN wrapper. There are many benefits to sending messages in XML format, such as the ability to ensure interoperability. Middleware users appear willing to tolerate the cost of parsing and serializing XML documents, because they can make their software more widely available. <br>
<br>
IBM, Microsoft, Userland, and DevelopMentor presented soap to the consortium in 2000 and became the Note,soap longer-term development plan for the consortium that is now being developed by the consortium of the XML protocols of the group. This is a powerful indication that soap will be a stable specification until the Working Group delivers the specification. <br>
<br>
UDDI (Universal Description, Discovery and integration Service) <br>
<br>
UDDI provides customers with dynamic lookup for other web <br>
<br>
The mechanism of services. With UDDI interfaces, business processes can be dynamically connected to the services provided by external business partners. A UDDI registry is similar to CORBA's trader, or it can be imagined as a business application's DNS service. A UDDI registry has two types of customers: a business application that publishes a service (and uses an interface), and a customer who wants to get a specific service. The following table provides an overview of the services provided by UDDI. The UDDI layer is above the soap layer and assumes that both the request and the answer are UDDI objects that are delivered as SOAP messages. A simple query is also included below. <br>
<br>
<br>
<br>
With regard to support for a full range of discoveries (full-featured discovery), UDDI does not have a recent plan. UDDI wants to be the foundation of higher-level services that support other standards. UDDI programs support more complex business logic, including hierarchical business organizations. UDDI has broad support, IBM, Ariba, and <br>
<br>
Microsoft is fully committed to pushing it forward. So far, it's not an open standard. <br>
<br>
<br>
<br>
UDDI examples <br>
<br>
<br>
Query: The following query within the SOAP package returns the details of Microsoft. <br>
<br>
<br>
<br>
<find_business <br>
<br>
Generic= "1.0" xmlns= "Urn:uddi-org:api" > <br>
<br>
<br>
<br>
<br>
Face=arial,helvetica> <br>
<br>
<name>Microsoft</name> <br>
<br>
<br>
<br>
<br>
Face=arial,helvetica></find_business><br>
<br>
<br>
<br>
Results: The Businessinfo element contains information about Microsoft-registered services, including the UDDI service itself. <br>
<br>
<businesslist generic= "1.0" <br>
Operator= "Microsoft Corporation" <br>
Truncated= "false" <br>
xmlns= "Urn:uddi-org:api" ><br>
<businessInfos><br>
<businessInfo<br>
businesskey= "0076B468-EB27-42E5-AC09-9955CFF462A3" ><br>
<name>microsoft corporation</name><br>
<description xml:lang= "en" ><br>
Empowering people through great software-<br>
Any time, the any device are Microsoft ' s <br>
Vision. As the worldwide leader in software for personal<br>
And business Computing, we strive to produce innovative <br>
Products and Services This meet our customer ' s<br>
</description><br>
<serviceInfos><br>
<serviceInfo<br>
businesskey= "0076B468-EB27-42E5-AC09-9955CFF462A3" <br>
servicekey= "1FFE1F71-2AF3-45FB-B788-09AF7FF151A4" ><br>
<name>web Services for Smart searching</name><br>
</serviceInfo><br>
<serviceInfo<br>
businesskey= "0076B468-EB27-42E5-AC09-9955CFF462A3" <br>
servicekey= "8bf2f51f-8ed4-43fe-b665-38d8205d1333" ><br>
<name>electronic Business Integration services</name><br>
</serviceInfo><br>
<serviceInfo<br>
businesskey= "0076B468-EB27-42E5-AC09-9955CFF462A3" <br>
servicekey= "611c5867-384e-4ffd-b49c-28f93a7b4f9b" > <br>
<name>volume Licensing Select program</name> <br>
</serviceInfo><br>
<serviceInfo<br>
businesskey= "0076B468-EB27-42E5-AC09-9955CFF462A3" <br>
servicekey= "a8e4999a-21a3-47fa-802e-ee50a88b266f" ><br>
<name>uddi Web sites</name><br>
</serviceInfo> <br>
</serviceInfos><br>
</businessInfo><br>
</businessInfos><br>
</businessList><br>
<br>
Wsdl:web Service Definition Language <br>
<br>
WSDL provides a service provider with a Web <br> that describes how to build on different protocols or encodings
<br>
Service requests the method of the basic format. WSDL is used to describe a web <br>
<br>
What the service can do, where it is located, how to call it, and so on. On the assumption with Soap/http/mime <br>
<br>
As a remote object invocation mechanism, the WSDL works best. UDDI Registration describes the Web <br>
<br>
Most aspects of service, including the binding details of services. WSDL can be thought of as a subset of UDDI service descriptions. <br>
<br>
<br>
<br>
WSDL defines a service as a collection of network endpoints, or a collection of ports. In WSDL, the abstract definition of endpoints and messages is separate from their specific network implementations and data format bindings. This allows you to reuse these abstract definitions: messages, abstract descriptions of the data that needs to be exchanged, port types, and abstract collections of operations. A reusable binding is formed for specific protocols and data format specifications for a particular port type. A port is defined as a network address and a reusable bound join, and the set of ports is defined as a service. So a WSDL document uses the following elements when defining network services:<br>
Type--<br>
<br>
Containers that define data types using some type of system (such as XSD) <br>
Message--type definition of communication data abstraction <br>
Operation--<br>
<br>
Abstract description of the action supported by the service <br>
Port Type-an abstract collection of operations that is supported by one or more endpoints <br>
Binding--<br>
<br>
Specific protocol specification and data format specification for a particular port type <br>
Port-a single endpoint defined as a binding and a connection to a network address <br>
<br>
<br>
Services-a collection of related endpoints <br>
<br>
<br>
<br>
So, you can say that WSDL provides customers with a template that allows them to describe and bind services. <br>
<br>
<br>
<br>
The following is a simple example of a service used in the example to find the price of a Motorala stock. <br>
<br>
Service Description:<br>
<br>
<?xml version= "1.0"?><br>
<definitions name= "StockQuote" <br>
Targetnamespace= "HTTP://EXAMPLE.COM/STOCKQUOTE.WSDL" <br>
xmlns:tns= "HTTP://EXAMPLE.COM/STOCKQUOTE.WSDL" <br>
xmlns:xsd1= "Http://example.com/stockquote.xsd" <br>
xmlns:soap= "http://schemas.xmlsoap.org/wsdl/soap/" <br>
xmlns= "http://schemas.xmlsoap.org/wsdl/" ><br>
<types><br>
<schema targetnamespace= "Http://example.com/stockquote.xsd" <br>
xmlns= "Http://www.w3.org/1999/XMLSchema" > <br>
<element name= "Tradepricerequest" ><br>
<complexType><br>
<all><br>
<element name= "Tickersymbol" type= "string"/><br>
</all> <br>
</complexType> <br>
</element><br>
<element name= "Tradeprice" > <br>
<complexType> <br>
<all><br>
<element name= "Price" type= "float"/> <br>
</all> <br>
</complexType> <br>
</element> <br>
</schema><br>
</types><br>
<br>
<message name= "Getlasttradepriceinput" ><br>
<part name= "Body" element= "Xsd1:tradeprice"/><br>
</message><br>
<message name= "Getlasttradepriceoutput" ><br>
<part name= "Body" element= "Xsd1:tradepriceresult"/><br>
</message><br>
<br>
<porttype name= "Stockquoteporttype" ><br>
<operation name= "Getlasttradeprice" ><br>
<input message= "Tns:getlasttradepriceinput"/><br>
<output message= "Tns:getlasttradepriceoutput"/><br>
</operation><br>
</portType><br>
<br>
<binding name= "Stockquotesoapbinding" <br>
Type= "Tns:stockquoteporttype" ><br>
<soap:binding style= "Document" <br>
Transport= "Http://schemas.xmlsoap.org/soap/http"/><br>
<operation name= "Getlasttradeprice" ><br>
<soap:operation<br>
soapaction= "Http://example.com/GetLastTradePrice"/> <br>
<input><br>
<soap:body use= "literal" <br>
Namespace= "Http://example.com/stockquote.xsd" <br>
Encodingstyle= "http://schemas.xmlsoap.org/soap/encoding/"/><br>
</input> <br>
<output><br>
<soap:body use= "literal" <br>
Namespace= "Http://example.com/stockquote.xsd" <br>
encodingstyle= "http://schemas.xmlsoap.org/soap/encoding/"/> <br>
</output> <br>
</operation><br>
</binding><br>
<br>
<service name= "StockQuoteService" ><br>
<documentation>my-Service</documentation><br>
<port name= "Stockquoteport" binding= "tns:stockquotebinding" > <br>
<soap:address location= "Http://example.com/stockquote"/><br>
</port><br>
</service><br>
<br>
</definitions><br>
<br>
<binding name= "Stockquoteservicebinding" <br>
Type= "Stockquoteservicetype" > <br>
<soap:binding style= "RPC" <br>
Transport= "Http://schemas.xmlsoap.org/soap/http"/><br>
<operation name= "GetQuote" > <br>
<soap:operation <br>
soapaction= "Http://www.getquote.com/GetQuote"/><br>
<input><br>
<soap:body type= "Inmessagerequest" <br>
Namespace= "Urn:live-stock-quotes" <br>
encoding= "http://schemas.xmlsoap.org/soap/encoding/"/> <br>
</input><br>
<output><br>
<soap:body type= "Outmessageresponse" <br>
encoding= "http://schemas.xmlsoap.org/soap/encoding/"/><br>
</output><br>
</operation> <br>
</binding><br>
<service name= "StockQuoteService" ><br>
<documentation>my-Service<br>
</documentation><br>
<port name= "Stockquoteport" <br>
binding= "Tns:stockquotebinding" ><br>
<soap:address location= "Http://example.com/stockquote"/><br>
</port><br>
</service><br>
</definitions><br>
<br>
SOAP request:<br>
<br>
Post/stockquote http/1.1<br>
Host:www.stockquoteserver.com<br>
Content-type:text/xml;<br>
charset= "Utf-8" <br>
Content-length:nnnn<br>
SOAPAction: "Some-uri" <br>
<br>
<SOAP-ENV:Envelope<br>
xmlns:soap-env= "http://schemas.xmlsoap.org/soap/envelope/" <br>
soap-env:encodingstyle= "http://schemas.xmlsoap.org/soap/encoding/" > <br>
<SOAP-ENV:Body><br>
<m:GetLastTradePrice<br>
Xmlns:m= "Some-uri" ><br>
<symbol>MOT</symbol><br>
</m:GetLastTradePrice> <br>
</SOAP-ENV:Body><br>
</SOAP-ENV:Envelope><br>
<br>
Soap Reply:<br>
<br>
http/1.1 OK Content-type:text/xml; charset= "Utf-8" <br>
Content-length:nnnn<br>
<br>
<SOAP-ENV:Envelope<br>
xmlns:soap-env= "http://schemas.xmlsoap.org/soap/envelope/" <br>
soap-env:encodingstyle= "http://schemas.xmlsoap.org/soap/encoding/"/> <br>
<SOAP-ENV:Body><br>
<m:GetLastTradePriceResponse<br>
Xmlns:m= "Some-uri" ><br>
<Price>14.5</Price><br>
</m:GetLastTradePriceResponse><br>
</SOAP-ENV:Body><br>
</SOAP-ENV:Envelope><br>
<br>
Xlang<br>
<br>
<br>
The traditional concept of transactions in a database is atomic, that is either not done or done all. Maintaining this atomicity in distributed systems generally takes a costly approach, a two-phase commitment. Another model of relative optimization is also under study (originally called Sagas, by Hector <br>
<br>
Garcia-molina suggests that each action has a definite complementary action to cancel the result of the action. In real life, there are many examples of such complementary actions, for example, you take out the $52 in the credit card, complementary action is deposited in $52, you send an email said "You will be in 7 days to get your scheduled products", the complementary action is to send an email said "Oh, you have to wait a few days." XLANG is based on the concept of a complementary action that represents any request to be canceled. and web <br>
<br>
The distributed basis of service will promote the development of the XLANG specification so that it can complete the complex undo operation. <br>
<br>
Xaml<br>
<br>
The Transaction Authority Markup Language (XAML) provides the traditional two-phase commitment transaction semantics. There is an example of a business-to-business transaction in the XAML specification. XAML is not exclusively limited to two-phase commitments, and some operations can act as complementary as XLANG. Two-phase commitment is clearly effective in enterprise integration, and a large number of web transactions, such as the business of business, can be done in a cheaper complementary action model. Unless the XAML puts complementary actions first, the reason for XLANG existence is more adequate. <br>
<br>
Scenario<br>
<br>
The following scenario illustrates a business transaction, including a batch of Web services, and will take advantage of XAML. Consider a company that buys benzene from a chemical plant online. In order for buyers to be able to buy, the seller must have additional value-added services provided by third parties, such as shipping methods, payment methods, accident insurance, safety transport license and so on. The buyer will agree to purchase until all services are in place and meet his requirements. He can buy or not buy, in other words, must meet all the relevant requirements, it is possible to complete the business activities. <br>
<br>
Software that provides top-level business transaction functionality must coordinate each Web service. including (1) Seller's inventory system, (2) Insurance services to ensure that products can be transported, (3) Financial services to ensure payment in accordance with the seller's form, (4) transport services to ensure timely delivery of goods; (5) Coordinate services to ensure consistency with government safety requirements. <br>
<br>
XKMS (XML Key Management specification) <br>
<br>
XKMS is the result of Microsoft and VeriSign integrating PKI and digital authentication (for Internet transaction Security) with XML applications. The key idea is to put the signature processing on a trusted server (trust server) on the web so that small customers don't have to do it on their own. XKMS relies on the XML digital signature specification and the XML Encryption specification being developed. The XKMS specification now relies on XML,SOAP,WSDL. <br>
<br>
Other examples <br>
<br>
The Web service platform is an ecosystem of development, and Darwinism still works, with evolution, competition, and chaos. Here is a small example. <br>
<br>
XFS <br>
<br>
The XMethods file system service allows you to read or paste files through the SOAP interface. This system allows developers to create services that use centralized and stable data. Ideally, this file system can be used to centralize information that is accessed by multiple nodes. For example, you can use it to support automatic upgrades of patch patches. XFS provides a client-side tool that integrates the XFS Web Service in Windows Explorer so that Windows Explorer integrates the Xml-soap-based file system. XFS is open source, founded by Xmethods.com, its future is not clear, but the idea is technically attractive. <br>
<br>
<br>
<br>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.