I have a WebServiceHost that is being used to host some web services in a console app. I added a service reference to it in my client app and create the proxy like so:
I have another scenario for this issue, even if I added [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest)] on the Operation Contact Method, it still doesn't work, I found this post is resolve my problem. http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html
What we need to do is simply locate the file “reference.cs” generated after adding service reference. Search keyword: “public interface ITestService” within the client project, you will find the generated service contract, add [System.ServiceModel.Web.WebGet] on top of the OperationContract.
So I had had added [System.ServiceModel.Web.WebGet] on the top of OprationContract on the proxy class of client side, it works.