About message formatter, from MSDN, we know that WCF uses DataContractSerializer by default to convert between Message and parameters in our web service methods. But from MSDN, DataContractSerializer can only be used for one object at one time. How about a list of parameters? After debugging, I found that DataContractSerializerOperationFormatter or PrimitiveSerializerFormatter is used to do this type of work.
My question is: if we want to use HttpWebRequest to interact with WCF, how can I format the parameters to send to server side?
But if we use more than one parameters in a [WebInvoke] operation, we have to set BodyType = WebMessageBodyStyle.Wrapped. Then your code above failed! In this case, I want to know that whether DataContractSerializer is the only class used to do serialize or deserialize work? If yes, how can it control the wrapper element and what's the rule? If not, which class should I use to produce a Wrapped Reuqest XML? Thanks again!