I have simple wcf service with one operation:
<service name="HelpService">
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
[OperationContract]
public string GetQuickHelp(string contentId)
Service is used on client side over JQuery. All works ok without any problems. Then after reading a lot of articles about correct errors handling I have added behaviorExtension to subscribe error hanlder (like here). This have created problems for this method. Serialization of simple string parameter failed (behavior is derived from WebHttpBehavior without any additional logic except errorhandler subscribe). I have found that methods that accept complex parameters (like datacontract) works ok after adding it. But simple/primitive types - fails. As far as I could see this is connected with WebMessageBodyStyle. Of course I could provide correct value for every method (with simple parameter and complex) but such fix seem to me not so clever.
Does anyone have ideas how to fix this?