Sunday 15 July 2012

Consuming WCF REST service in multiple ways (.Net, plain XML) -


I am quite disappointed with WCF because I want to use this simple scenario:

  1. Provide a webservice with URImartplates such as / method / {param1} / {param2} / and a 3th parameter which is sent as a service to XML in the form of post data Please.
  2. Do not use plain XML, no SOAP overhead.
  3. Be able to produce a proxy in Visual Studio so that the service can be used easily on the net using a customer (here is no cares about Soap Overhead). / Li>

I can make 1 and 2. But the way I can not use 3. I tried to add both webHttpBinding and basicHttpBinding services; I changed my code to & lt; Services /> Fooled with the tag , but I'm not getting this job, what am I missing here ?!

N.B. I have examined this article: But there is nothing described here that works here ?!

You can not generate webhtml bindings and basic HTPIDP for client proxy uses SOAP there's no way. The questions that you are referring to enabling both bindings, you can not choose the features of your choice from every binding.

However, why do you want to create a client proxy? Microsoft. Using the HTML Library, calling your service is as easy as

  var client = new HTTP client (); Var content = HttpContent.Create (myXmlDocument); Client.Post ("http://example.org/param1/param2", content)  

No comments:

Post a Comment