2 more articles about creating and callingRestful WCF ServiceAspectArticle:
Article 1: WCF rest service with XML/JSON response format according to Content-Type Header
The above article introduces the implementation details of the restful WCF Service, which is graphic and easy to read. There are also descriptions of the WCF configuration file, including helpenabled and automaticformatselectionenabled parameter settings, and so on; use of filddler tool; write C #CodeCreate an httpwebrequest object to call the restful WCF Service.
Article 2: WCF rest service with JSON (codeproject.com)
The above Article Page introduces some details about creating restful WCF services. The purpose of this file is recommended here: (1) when the client C # code method restful service is used to create a WebClient object, it is different from the previous article to create an httpwebrequest object;
WebClient client = New WebClient ();
Byte [] DATA = client. downloaddata ( " Http: // localhost: 11523/service1.svc/getdata " );
Stream stream = New Memorystream (data );
Datacontractjsonserializer OBJ =NewDatacontractjsonserializer (Typeof(String));
StringResult = obj. readobject (Stream). tostring ();
MessageBox. Show (result );
(2) Client ApplicationsProgramProvides complete code for download reference.
For other restful WCF services, refer to here.