I am working on creating WCF services that will work independently of .Net clients. Thanks to Google and StackOverflow, I was able to create both simple xml and json services without a Soap wrapper and a bunch of fancy WCF materials that I just don't need. It was a painful experience, therefore, the storyline of this issue. WCF is crazy client-side buggy when using WebGet and WebInvoke when automatically adding a service link.
To test the connection, I created the WCF client locally and passed everything through Fiddler . Thus, regardless of whether it works or not, I can at least see what the client is trying to send. And when it finally works, I see that the data is being sent from both ends, and then duplicate this message in the non.Net client.
My current problem is that when I change the service to wait for POST data as json (enableWebScript action), the client has no idea, and it still tries to send the objects as xml. I had a lot of problems with the client configuration that were not automatically installed properly when using the Add Service Reference, so I hope this is a simple thing that I can add to app.config on the client. When using XML, the objects that I create and use in the service are automatically processed by the XML client (which is most convenient). Is it possible to do this as json in the current version of WCF?
It should be noted that I managed to figure out what I need to do manually and get it to work in its original form using Fiddler (query builder), so I can serialize my objects in code and send data manually via http post ... what am I doing it is in my clients offline. It is more a question to better understand the aspects of WCF and why I have so many attributes on the client side where documentation is not enough to solve problems.
source
share