Web Services suddenly got hot, especially M $. net describes a world of interconnection and sharing for us. In fact, these bright prospects have been predicted before the birth of Java, but the ideal implementation process is always rugged and long.
Let's look at how Web Services work from an application:
There is a Coffee Break, the boss of a Coffee chain store, who wants to expand his own Coffee varieties. He instructs his purchasing manager to find some new Coffee providers and get all their Coffee prices, the Coffee Break can analyze their prices and decide which type of Coffee to choose and which company to purchase.
Inquiry
The Purchase Manager assigns specific tasks to software engineers, who believe that the best way to find a new coffee provider is to search for the UDDI registration center.
UDDI registration center: (Universal Description, Discovery, and Integration (UDDI) registry). UDDI Registry is a logical unity and is physically implemented in a distributed system architecture, different Sites are implemented through P2P (peer-to-peer network) architecture. Therefore, accessing any site is equivalent to accessing the UDDI Registry.
Of course, Coffee Break also registers itself in the UDDI registration center.
Software engineers use JAXR (Java API for XML Registries) to issue a command to query all coffee providers. JAXR uses JAXM (Java API for XML Messaging) to send messages in the background, that is, XML text is sent based on SOAP.
The UDDI registration center accepts the XML text and starts the exact search, but after the search is complete, the Registration Center will send back information about how to contact qualified coffee dealers. XML text is also sent back Based on SOAP.
The next step for engineers is to list their coffee sales prices from the distributors list. The work is divided into two steps:
1. using JAX-RPC (Java API for XML-based RPC) to obtain and analyze the WSDL text (Services Description Language (WSDL) document ). this is also an XML text that provides all the information about Web Services: Tell visitors what services they provide, what the service content is, and how to obtain the service content.
2. after analyzing the WSDL text, the engineer obtained the method for obtaining the coffee sales price and the corresponding URL. he sent a request to the specific coffee dealer website to get the price of the coffee he sold.