Web Services suddenly hot, especially M $ .NET, in fact, the world of interconnected sharing, in fact, these beautiful prospects have been born in Java, but the ideal implementation process is always rugged. We are from one Application Take a look at how Web Services works: The boss of a coffee chain is called Coffee Break. To expand its own coffee variety, he indicates his purchase manager to find some new coffee providers, getting their coffee. And when needed, Coffee Break can analyze their prices and decide which company to choose which company purchase. Inquiry procurement manager, assign specific tasks to software engineers, software engineers think finding new coffee The best way for providers is to search for the UDDI registry.
UDDI Registration Center: (Universal Description, Discovery, And Integration (UDDI) Registry, UDDI Registry is a logically unified body, which is implemented in the architecture of the distributed system, while the different sites are P2P (Pertile network) architecture is implemented, so accessing any site is basically equal to accessing UDDI Registry.
Of course, Coffee Break has also registered ourselves in the UDDI registry. Software engineers have issued a JAXR (Java API for XML Registries) to query all coffee providers instructions, Jaxr uses JAXM (Java API for XML Messaging) in the background. It is based on SOAP to send XML text. The UDDI registration center accepts this XML text and starts an accurate search, but after search is complete, the registry will send back information about how to contact those coffee dealers. Also based on SOAP sends back to XML text. The next step of the engineer is to list their coffee sales prices from these distributors list: 1. Follow JAX-RPC (Java API for XML-Based RPC) to complete the acquisition and Analyze WSDL text. This is also an XML text, which gives all information about Web Service: What services are told to visit the visitors, what is the service content, how to get these service content, etc. 2. After the engineer analyzed the WSDL text, it got the method of obtaining the price of coffee sales and the corresponding URL. He issued a request to the specific coffee dealers website to get the coffee price they sold. Each coffee distributor accepts To this request, before he issued a sales price, he will first check the current futures price of the product, so Coffee Break has received the latest XML text format coffee prices. As: < Lagbia Coffee> 19.20 仑比 Coffee> Price> .... Coffee> XML is the latest browser language that is about to replace HTML, we usually browse through your browser, see They are all files written by HTML, and they are files written in the future. Analyze the price and order read XML text has two ways: SAX and DOM, for simple comparison, use SAX more efficient than DOM, but if you want to modify the price list It is necessary to use SAX to compare the price list sent by these distributors using SAX, and have got a result of the results, and the purchase manager or boss Coffee Break. Once you decide ordered coffee, it is also sent XML text and distributors are ready to sell Coffee Break through the Internet, which is ready to release this coffee variety on his website. Coffee Break certainly can't sell coffee with your own purchase, engineers use DOM modified the above XML Document, multiply 125% of each price, this is the coffee sales price of Coffee Break. Engineers use JSP to make an order form. In this JSP program, he can read each coffee from the XML document modified above. Name and price. Just choose to purchase quantity, then press Submit to put its shopping cart in the current coffee, start online shopping. Web service is to transmit and accept XML text between various websites to achieve the purpose of information exchange. There is a protocol when accepting and transmitting, is SOAP (Simple Object Access Protocol), this is an XML HTTP protocol. The current website announced information through the HTTP protocol to the user's browser, so SOAP has a wide range of The application basis, now the popularity of XML is now popular. However, because XML is a pure data structure, only the Internet will go back to the era of academic research, so it is important that FrontPage Dreamweaver's XML-based powerful page design tool is important, but Such visualization tools are difficult to design. So XML has time problems, then the true implementation of the above beautiful prospects provided by Web Services, I am afraid it is not going to be reached in one or two years. But Web Services brought by companies specializing in Internet services. Opportunity, because their customers are a business website, so they can develop a commercial application without having to install these applications on the servers of their customers like ordinary software, but let their client websites call through SOAP. These software functions, and support a certain amount of use. For the website as a customer, I purchased a new Internet service. It doesn't have to set up the server. You have to purchase a lot of software, and you need to maintain them, as long as the Web Services that provides this feature by directly call You can, such as shopping cart features, this is necessary for each online store.