I am new to WCF
. I have requirement to use same WCF for both
SOAPand
JSON` format using post method.Is it possible or not. Please guide me.
Asked
Active
Viewed 109 times
0

Balagurunathan Marimuthu
- 2,927
- 4
- 31
- 44

Ilaya Bharathi
- 93
- 1
- 14
-
1Possible duplicate of [Hosting WCF soap and rest endpoints side by side](http://stackoverflow.com/questions/3366103/hosting-wcf-soap-and-rest-endpoints-side-by-side) – Ricardo Pontual Sep 16 '16 at 16:18
2 Answers
0
You need to set up two endpoints. However, if at all possible I would advise using WebAPI for your JSON service. WCF's DataContractJsonSerializer is rather lacking and doesn't encode things (such as dates) quite right. You can hack in Newtonsoft's JSON.Net, e.g. http://itq.nl/replacing-wcf-datacontractjsonserializer-with-newtonsoft-jsonserializer/ but I'd only go that route if you have to.

Nethemas
- 136
- 1
- 9
0
Yes, you can for sure. i did many a times.

Mohammed Saifullah
- 28
- 4
-
Can you please give me some sample code for reference to check how it's work – Ilaya Bharathi Sep 20 '16 at 04:47