views:

610

answers:

2

Is it possible to consume a JSON enabled WCF Web Service from a standard Proxy Client ie not Javascript?

Basically I want to minimize the payload size between 2 web services.

A: 

Yes, it is, if the service interface definition on the client side is setup correctly (i.e. the RequestFormat/ResponseFormat properties of the WebGet/WebInvoke attribute on the operation contracts are set to Json. Also remember you'll need to use the WebHttp or WebScriptEnabled behaviors on your client.

Notice that JSon won't necessarily be most efficient given the current implementation in WCF; there are definite trade offs you'll be making. There's a good overview of it on this article.

tomasr
A: 

Microsoft has an article about this: http://msdn2.microsoft.com/en-us/library/bb412173.aspx

carl