Let me see if I can explain.
In general, encoding refers to how the data in the programming structure (e.g. int num = 5) is serialized into xml. SOAP 1.2 specification allows you to define the encoding style. The encoding style you choose to use is entirely up to you. You can theoretically define an encoding style called
http://customstyles/simkim. As long as both web service provider and consumer understand this style they will be able to deserialize xml into their respective programming data structures. When you use the standard soap encoding as the encoding style, your encodingStyle attribute will be,
http://schemas.xmlsoap.org/soap/encoding. Now, to address your question, SOAP specification allows defining encoding style attribute at various levels. This means your header may use one encoding style and body may use another. However, Basic Profile (BP) explicitly prohibits the use of encoding style. Remember, the goal of BP is to clarify rules defined in the [wsdl, soap etc.] specifications and in some cases make them stricter. BP wants you to use literal style all the time and use schema to [de]serialize data in and out of XML. So, in your example, what BP is essentially saying is
1. SOAP message CANNOT contain encodingStyle attribute at envelope, header or body level
2. SOAP message cannot contain encodingStyle attribute at one level below the body level i.e. child of the body element
3. For RPC-literal binding, grand children of the body element will define input and output parameters of the web service operation. Since you are using RPC-
literal, those grand children cannot be
encoded in any style.
I hope this helps. Let me know if this still not clear. This stuff is extremely important for interoperability.
[ November 05, 2008: Message edited by: Chintan Rajyaguru ]