Http://hi.baidu.com/sonan/item/950accf57beba0de6225d2fb
XML-RPC, the difference between SOAP
In the early stages of web services development, the first major use of XML formatted messages was to apply to the RPC protocol, where RPC represented a remote procedure call. In XML remote procedure call (RPC), the client sends a specific message that must include the name, the program that runs the service, and the input parameters.
XML-RPC can only use a limited range of data types and some simple data structures. People thought the protocol was not strong enough, so there was a soap--. Its original definition was a Simple Object access protocol. After that, it was gradually realized that soap was not simple, and that there was no need to use an object-oriented language, so now people just follow the name of soap.
XML-RPC has only a simple set of data types, and instead, SOAP defines the data type by taking advantage of the constant evolution of the xml-based schema. At the same time, soap can take advantage of the XML namespace, which is not necessary for XML-RPC. As a result, the beginning of a SOAP message can be any type of XML namespace declaration, at the cost of adding more complexity and incompatibility between systems.
With the awakening of the computer industry and the discovery of the commercial potential of xml-based Web services, companies are beginning to tap into ideas, ideas, arguments, and standardized attempts. The consortium has managed to organize the results exhibition in the name of "Web service Activity", which also includes the XML protocol workgroup (XML Protocol Working Group), which actually makes soap. The number of standardized results associated with Web services (in some ways soap-related or soap-dependent) has multiplied to a surprising extent.
Initially, SOAP developed as an extension of XML-RPC, and it focused on remote procedure calls through the method and variable names obtained from the WSDL file. Now, by making progress, people are discovering more ways to use soap than just "file"-basically using a SOAP envelope to transfer XML format files. In any case, to master soap, it is essential to understand the role that WSDL plays.
SOAP Packet Structure parsing
SOAP messages are called a soap Envelope, including the SOAP header and SOAP body. Among them, the SOAP header can easily insert various other messages to expand the functionality of the Web service, such as security (with a certificate access Web service), SOAP body is the specific message text, that is, after the Marshall information.
When soap is invoked, that is, sending an HTTP POST message to a URL (such as HTTP://API.GOOGLE.COM/SEARCH/BETA2) (the HTTP GET message can also be supported according to the SOAP specification), and the name of the calling method is called in the HTTP The Request Header is given in Soap-action, followed by the SOAP envelope. The service receives the request, performs the calculation, Marshall the returned result into XML, and returns it to the client with HTTP.