.NET Framework Developer Center >
.NET Development Forums
>
Windows Communication Foundation
>
JSON enabled WCF Service understanding
JSON enabled WCF Service understanding
After trying to make my first WCF, I ended up with a lot of questions.
VS 2008 (Calling service using javascript):
1. Are the JSON enabled WCF services remotely accessable ?
2. Do we need to create a proxy in our local machine to comsume remote WCF service?
3. If Yes, why are we doing a JSON enabled service?
4. How do the service know the return path to return the JSON object?(the application from which we call the service)
VS 2005 (Calling service using javascript):
1. Can we invoke the service from VS 2005 environment?
Thanks in advance.
Answers
- Ok, here we go :)
VS 2008:
1) Yes, what's the point of having a service if nobody can access it...
2) Yes
3) JSON is a format of communication, just like XML
4) Well, the communication is done via HTTP requests. Below that, there are sockets. Each socket is defined by its ip and a port it uses to communicate with outside world (a service in this case).
VS 2005:
1) Yes, you only need to have the latest versions of .NET Framework installed (i.e. if you want to use the built in AJAX functionality - a web service can be accessed from a number of different frameworks as long as they follow the rules of communication).
You should check out the following article: Calling Web Services From Client Script
Hope this helped!
Regards,
Stipe-Ivan- Marked As Answer byBin-ze ZhaoMSFT, ModeratorTuesday, November 10, 2009 6:06 AM
- You can download the Windows SDK, it contains SvcUtil.exe. Regarding the other question, you have to have a proxy of some kind. You can have a classic proxy, created by SvcUtil or you can use self-crafted proxy e.g. that will invoke your REST service and parse the received data.Regards,Stipe Ivan
- Marked As Answer byBin-ze ZhaoMSFT, ModeratorTuesday, November 10, 2009 6:06 AM
All Replies
- Ok, here we go :)
VS 2008:
1) Yes, what's the point of having a service if nobody can access it...
2) Yes
3) JSON is a format of communication, just like XML
4) Well, the communication is done via HTTP requests. Below that, there are sockets. Each socket is defined by its ip and a port it uses to communicate with outside world (a service in this case).
VS 2005:
1) Yes, you only need to have the latest versions of .NET Framework installed (i.e. if you want to use the built in AJAX functionality - a web service can be accessed from a number of different frameworks as long as they follow the rules of communication).
You should check out the following article: Calling Web Services From Client Script
Hope this helped!
Regards,
Stipe-Ivan- Marked As Answer byBin-ze ZhaoMSFT, ModeratorTuesday, November 10, 2009 6:06 AM
- Ivan,
Thanks for answering my quiries and posting some useful information.
I posted a question couple of days ago --> http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/748c904c-aaba-40c4-ad84-c97e7cded12e
The only thing I missed was adding a proxy on my local machine, because I had different understanding about JSON before.
After using Firebug the response was trying to hit ""POST http://localhost:4007/WCFService.svc/HelloWorld"" which never existed in my local machine.
In VS 2008 it is simple to add a WCF proxy by adding web reference.
1. I was wondering how do we do it for VS2005. because there is no svutil.exe in vs2005
2. Is there any way that we can communicate with WCF services without adding a proxy in the client application.
I couldn't test the service because i'm working from different location. so I keep the question open.
Thanks. - You can download the Windows SDK, it contains SvcUtil.exe. Regarding the other question, you have to have a proxy of some kind. You can have a classic proxy, created by SvcUtil or you can use self-crafted proxy e.g. that will invoke your REST service and parse the received data.Regards,Stipe Ivan
- Marked As Answer byBin-ze ZhaoMSFT, ModeratorTuesday, November 10, 2009 6:06 AM


