Wrapped style means in the
SOAP request message, there is an XML node with the operation name like this:
The parameter myname is wrapped by the operation name sayHello.
But in RPC BARE style, the operation <ns:sayHello> is omitted.
With wrapped style, the developer can tell what operation they are calling in the request. But with bare style, the developer cannot tell what operation they are calling.
If you use RPC, make sure no two methods have the same number and type of parameters.
But if you comment out one of the method ,you will get the SOAP request:
You will see with RPC BARE style, the parameters are not wrapped by its operation node.
Since there is no operation node in this style, the above eat and sayHello method cannot have the same number and type of parameter to avoid ambiguity.
That is why wrapped style is the default.
Also with document style, the SOAP request can have user defined parameters like this:
But with RPC, you can only use primitive parameters or
string, no other object parameters.