Encoded vs literal, RPC vs document

Source: Internet
Author: User

I have not separated the concepts written in the question, after reading the JAX-RPC specification or fuzzy, the main reason is that the XML itself is not particularly in-depth understanding. But now I feel a little clear.

Encoded and literal are two types of typing systems. The former corresponds to http://schemas.xmlsoap.org/soap/encoding/, and the latter uses XML schema to define data types.

"Literal corresponds to only one layer of elements in types, and encoded corresponds to multiple layers of elements in types.

The customer must provide a clear parameter name for the parameter described by literal. The customer can use param1, param2, param3, and other parameters described by encoded ."

In axis, use the org. Apache. axis. description. operationdesc class to specify the method you want to use. The method is as follows:

"Login. setstyle (Org. apache. axis. enum. style. document); optional. setuse (Org. apache. axis. enum. use. literal);, this is for the document method, if it is RPC mode, it should be set to: Plain. setstyle (Org. apache. axis. enum. style. RPC); callback. setuse (Org. apache. axis. enum. use. encode); ", and then use call. setoperation (operator); associates the operationdesc object instance with the call object.

---- Zhao Xiaodong

For comparison between RPC and document, there are two good articlesArticle: Operation Style (document/RPC) and Message format (literal/encoded), the difference between RPC and Document Style WSDL

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.