WCF Service communication using MonoTouch - wcf

Can anyone point me in the right direction for where to start when calling a WCF Service from Monotouch?
I am developing an IPad App using Monotouch and its data needs to be provided by a WCF Service
Paul

As igor said in his comment, try http://docs.xamarin.com/ios/Guides/Application_Fundamentals/Introduction_to_Web_Services#Consuming_WCF_Services for a really good introduction.
Also, this video may help http://www.youtube.com/watch?v=BV76V_LVqpM
And there are also articles available on how to do cross platform wcf clients - eg http://sim4all.com/blogging/?p=173

Related

Do we need Web Service working experience to learn/work on WCF for web application?

I have not worked on Web Services, but now I am planning to work on WCF Services in my next web application project. Do we need to have prior working experience on Web Services to work on WCF ?
can we start learning/working on WCF directly with out working experience in Web Services ?
You do not need any prior experience in web services to use WCF, though it would of course help in some situations. Having said that, WCF does have a learning curve (like everything), so you should consider going through some training, like the excellent Pluralsight training.
In addition to some sort of training, a must have resource for WCF in my opinion is Juval Lowy's book, Programming WCF Services.
Good luck!
What do you mean by Web Services? Do you mean ASP.NET Web Services (ASMX)? If so, you don't need experience with them to learn WCF.
WCF is API for creating web services (and remote services generally) so once you start learning WCF you will start learning how to create and work with web services.
I think yes. It should not be a problem to write a WCF service even if you do not have web service development background. At least, I did not have this experience at the beginning :). I have posted a link to good WCF book at:
Recommended beginner's learning resources for WCF

Hosting WCF Rest Services in WPF Application

Hi i have some REST services created with WCF Rest Started Kit and i need to host these services in a WPF app. can someone point in the right direction?
There's a really good project in Codeplex called "WCF Guidance for WPF developers" which has white papers, articles, mini screencast to show you a lot of ways to use and leverage WCF if you're a WPF developer:
http://wcfguidanceforwpf.codeplex.com/
Not sure if they have anything on REST webservices - but go have a look!
For a series of intros to WCF REST Starter Kit services per se, go see the Pluralsight web site and their screencast series - excellent resources!
http://www.pluralsight.com/main/screencasts/default.aspx
Basically, hosting a WCF REST service in your WPF app is no different from hosting any other WCF service, so I do believe all the excellent Pluralsight screencasts on hosting your own service should definitely give you a heads-up on how to proceeed!
Marc

Are WCF polling duplex services usable by other clients?

I'm writing a server app with a silverlight client. At some point I'd like non-silverlight clients to be able to use my services. Right now I've written some WCF services which get polled, but I'm not happy with the responsiveness. I'm thinking of switching the code over to using Silverlight/WCF duplex polling, but if I do that, will I be stuck with Silverlight as my only client? Is it better to write my own long-polling service using normal WCF http services?
I don't see your issue there. You can just define another binding for use by other clients (like WsHttpDualBinding). The same server code will perform the exact same task regardless of the underlying binding. That's the whole point of using WCF.
You can find a AJAX sample here for using a WCF duplex service http://tomasz.janczuk.org/2009/09/scale-out-of-silverlight-http-polling.html
By other .NET client - yes. By anything else : no. WsHttpDual is definitely NOT an interoperable protocol. It also has plenty of other drawbacks and pitfalls and I'd try to stay away from it as much as possible......
Marc

Tutorial on Consuming a WCF service in ASP.Net web site?

I'm attempting to create my first WCF service.
I've created the service and now I'm trying to call it from a asp.net (vb) web site and I've tried adding a web reference to it and using the scvutil.exe to consume the service.
So far neither have worked. It's not letting me declare the service in my code. If someone could point me to a good tutorial on how to consume a WCF service in an ASP.Net web site that would be great.
I've found numerous on how to use them with AJAX or silverlight or windows apps but nothing on using it in just a plain old website.
Please see Beginner's Guide to Windows Communication Foundation. It's part of the WCF Developer Center on MSDN, which is full of good resources.
The link above is broken. Some other links I've found while searching for it:
Developing Service-Oriented Applications
Windows Communication Foundation
Conceptual Overview
Getting Started Tutorial
How to: Create a Windows Communication Foundation Client
Basic WCF Programming
Just add service reference, use the service reference as using "reference1.xxxx" and then use the client code.
That's all after the initialization. It works for me. Let me know if you require any help.

Guidance on .net web services

It's been a few years since I've done web services. I remember it to be fairly simply to create and consume one. In my current position, I work in a large organization and we use a lot of DB2 stored procedures the mainframe guy write for us to get at HR data.
I'm now starting on a new HR project and rather than having the same ol' data access code that is in most of our other HR apps, I suggested we write a code library DLL that did all this work and just use this DLL in our HR apps from here on out. Once I suggested this, my manager thinks this is a great idea, but he wants it done in web services.
My manager has now tasked me with researching options for securing these web services would be. He wants me to tell him if we should use WCF with this and if the Java developers in the organization will be able to use the web services I create.
I have done quite a few web searches and haven't found information that specifically answers these questions. Is there anyone here with experience in doing this and could answer the qeustions regarding the security, WCF (which I know little about), and interoperability with other platforms (Java)?
Thanks!
WCF is the current approach for building service end points in .NET apps. It's flexible in supporting different transport channels and protocols. You can certainly expose SOAP Web Services from WCF and use them from Java clients or anything else that supports XML.
The old way of doing that in .NET, simple ASMX Web services is deprecated in favor of WCF. It doesn't have all the bells and whistles of WCF but it's very simple to use. Personally, I still like it and use it in very simple Web services where WCF is an overkill.
As Mehrdad mentions (and I totally agree), WCF is the current offering my Microsoft for most cases.
ASMX is great and simple - but it's very limited in many ways:
you can only host your web services in IIS
you can only reach your web services over HTTP
security is very limited
WCF remedies this - and offer much more beyond that. You can host your WCF services in IIS - or self-host in a console app or Win NT Service, as need be. You can connect your WCF services using HTTP, TCP/IP, MSMQ, Peer-to-peer protocols, named pipes for on-machine communications and much more.
I'd definitely recommend you check out WCF and give it a spin. It's a tad more complex than ASMX, but it also offer just sooo much more capabilities and choices!
As for resoures: there's the MSDN WCF Developer Center which has everything from beginner's tutorials to articles and sample code.
Also, I would recommend you have a look at the Pluralsight screen casts on WCF - it's an excellent series going from "Creating your first WCF service" and "Creating your first WCF client" all the way to rather advanced topics. Aaron Skonnard very nicely explains everything in 10-15 minutes screencasts - highly recommended!