I have been attempting to find a good implementation of Json rpc in wcf, but I have not had much luck yet.I have found several examples of implementations using jayrock and Json-rpc.net, but I would prefer to work within wcf as much as possible.
Has anyone ever developed a Json rpc server within wcf? If so, could you point me towards some example code or documentation?
Any help would be greatly appreciated!
It is a reasonable scenario. I'm not sure how to do it with WCF, but I think Web API is the way to go. Also from Microsoft.
Related
I'd like to access some web api's using .net code, but am not sure if there's a way to generate a client side wrapper of some kind for these? Perhaps a code generator that can look at the web api documentation or through sample calls and generated .net classes and methods to encapsulate the api?
There isn't. REST-based APIs do not have a WSDL or service contract that could be used to generate a client stub.
That said, consider the following alternatives:
REST Coder: this is interesting research but no definitive tools yet.
Google for .NET WCF REST client: it turns up a lot of interesting results.
As far as I know, there isn't.
However, you can try one of the many wrappers available, that makes your life easier once you have to write less code.
Check this one out I've written a few months ago:
http://webapiclient.azurewebsites.net
I have a webservice (.asmx) hosted on an ASP server with which i would like to communicate using SOAP from an iOS application.
For some functions, the server returns primitives, structures and datasets (as in system.data.dataset).
Can you please recommend me a framework that will manage the communications and XML parsing for me?
What kind of class should I use to emulate a dataset, or would I need to make one of my own?
For your connections try this framework: http://allseeing-i.com/ASIHTTPRequest/
However apples NSURLConnection api is pretty good and easy to use.
For easy XML parsing try: https://github.com/TouchCode/TouchXML
Hope this helps :)
Sam
I have been reading up on WCF and was looking for a good tutorial on creating a WCF Restful service that returns Json. I cant seem to find any that are really worth reading, does any have any ones they would recommend for someone who just wants to start with the basics and learn about WCF Restful service? I am unsure if I should start with WCF 3.5 or WCF 4 too. I am using Visual Studio 2010, so I could potentially do either one or both.
WCF4 already has nice built-in templates for JSON, whereas in WCF 3.5 it's a bit fiddly and you need to manually add support for that.
check this out for some docs
Hope this helps
I honestly used the MSDN and thought it was very thourough. Its what I used to get up to snuff and build my WCF Rest Service but I am assuming you already looked there. This was my favorite link that I to this day, still have bookmarked.
Pertaining to your 4.0 vs 3.5. I almost always defer to later technology if you can, especially WCF simply because Microsoft has made things a little easier with things such as what Leon stated.
there are these videos for beginners and certainly very helpful.
you can learn about how to create services within minutes.
http://msdn.microsoft.com/en-us/netframework/dd939784
There is a video to show how to configure a rest json service as well.
I have been reading up on WCF and was looking for a good tutorial on
creating a WCF Restful service that returns Json. I cant seem to find
any that are really worth reading, does any have any ones they would
recommend for someone who just wants to start with the basics and
learn about WCF Restful service?
I had exactly the same problem last year.
Eventually, I worked out the steps you have to follow to create a JSON WCF Web Service - it is straightforward if you get each of the steps right, but finding an easy-to-follow walkthrough was tough.
Here's the walkthrough I created, clearly documenting what you need to do:
http://mikesknowledgebase.com/pages/Services/WebServices-Page1.htm
I follow this walkthrough whenever I create services, both for my ASP.Net apps or iOS apps.
Good luck !
I would like to know what are the basic steps involved in setting up your application to able to read data from another application. Then take that data and modify it and send it back to the application.
The data being read will have over 100 fields.... what is the most efficent way to store them? Put them in a class object?
I know web services are involved...any other info would be great!
The application is in .NET using vb
Thanks
You may need to be more specific about your requirements to get a truly useful answer. That said, Windows Communication Foundation (WCF) is likely to make your life much easier. Google for tutorials -- I can't say I have a favorite. You can handle one- or two-way communication readily with WCF, and you can then focus more on making your application logic work.
i want to push data to user browser if an event happens on browser. with commet programming we can do this.
http://en.wikipedia.org/wiki/Comet_%28programming%29
are any good tutorials available on net??
you should try PokeIn comet ajax library for ASP.NET
Check out WebSync, a full comet server for .NET.
There are lots of tutorials available too.
There seem to be a lot of Comet related projects on GitHub: http://github.com/search?q=comet&type=Repositories&x=0&y=0. I don't see any that are ASP.NET or C#, but you can get an idea of how things work from the other implementations.
I think the best place to start is the Ajax Patterns page on Comet. Also, you might want to have a look at Dojo's CometD project. I've been playing with comet a bit, but there are some browser (as well as server) bugs that makes it inherently difficult, along with the fact that comet is directly opposite to the intended usage of HTTP (client sends request, server responds).
There is an open source ASP.NET comet implementation called aspComet on GitHub. The solution comes with a sample chat project you could check out to get started.