RPC model
RPC is a remote method call. Although WebService is XML-based, you can still use the remote method to call this mode to implement WebService, especially in the simple request model. In this process, the XML file in the transmission describes more information about remote methods.
Document Model
Document method. Compared with RPC, the XML file does not map remote methods, but a complete self-contained Business Document. After the service side receives this document, perform preprocessing (such as vocabulary translation and ing) first, and then construct the returned message. In the process of constructing the returned message, it is often no longer a simple method call, but multiple objects collaborate to complete the processing of a transaction and then return the result.
The difference between the two methods: Many automated tools are provided for the first method, which makes it easy to call remote methods. The latter method lacks the support of a series of tools, developers must manually complete the process.
Document is recommended. It has the advantages that RPC does not possess in the following aspects.
By using document, you can fully use the XML function to describe and verify a business document. In the RPC model, XML is only used to describe method information.
When using document, there is no need for close conventions between the customer's service providers, while the RPC model requires the customer to be closely connected with the service provider. Once the method changes, the client needs to make corresponding changes. This does not meet the requirements of low coupling systems, but is flexible in document exchange.
Because business data is self-contained, it is obvious that the document model is more conducive to asynchronous processing.
Which WSDL style should I use?
Http://www-128.ibm.com/developerworks/cn/webservices/ws-whichwsdl/