Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Scroll ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Scroll export button scope current template-id 4fda9400-a7df-4ede-a95f-e4ae5fcf4796 caption Download this Page add-on Scroll PDF Exporter
To Invoke WCF REST Services, Proxy Parameters are required, as mentioned below.
Proxy Parameters:
To consume all WCF REST Services, user needs to pass the Proxy Class (Username, Password, Return Type) and Mandatory Fields (mentioned in the note for every JSON Object Input Parameters) to get the Output.
Service authenticates the credentials first, and then processes the User Request.
Note | ||
---|---|---|
| ||
These authentication parameters are applicable for all WCF Rest Services methods |
REST Service Call Source Code
Example
Code Block | theme | DJango|
---|---|---|
| ||
WebClient webClient = new WebClient(); webClient.Headers["Content-type"] = "application/JSON"; webClient.Encoding = Encoding.UTF8; string body = "{\"ServiceName\":\"IM_GetIncidentDetailsAndChangeHistory\",\"objCommonParameters\":{\"_ProxyDetails\":{\"Pass word\":\"XXXXX\",\"UserName\":\" test@domain.com\",\"ProxyID\":0,\"ReturnType\":\"JSON\",\"OrgID\":1},\"TicketNo\":6290}}"; string URL = "http://<Customer_URL>/REST/Summit_RESTWCF.svc"; string method = "CommonWS_JsonObjCall"; string parameter = ""; string final = string.Format("{0}/RESTService/{1}{2}", URL, method, parameter); string res1 = webClient.UploadString(final, "POST", body); Console.WriteLine(res1); Console.ReadLine(); |
Scroll ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|