I have a WCF web service (using basicHTTPBinding) which I am connecting to from a Flex application. I am using the FlexBuilder code generation to make a proxy for the web service.
This has been working great until I tried to call a method on the web service that has no parameters. Here is it's interface declaration:
[OperationContract]
DateTime GetCurrentDateTime();
I then started getting HTTP 500 code responses from the service.
Inspecting the HTTP response with Fiddler shows that WCF is reporting the following error:
Error in deserializing body of request message for operation 'GetCurrentDateTime'.
The OperationFormatter could not deserialize any information from the Message because the Message is empty (IsEmpty = true)
So it seems that there is an incompatability between Flex and WCF whan calling methods that have no paramaters - Flex doesn't include anything in the message but WCF is expecting something to be there.
Is there any way to configure either Flex or WCF to work around this or am I going to have to include dummy parameters in such operation contracts?