views:

338

answers:

3

Hello All, I haven't really looked into the new .NET stuff since 2.0, but I'm wondering what the preffered way is for creating Web Services is now (SOAP, not RESTful). I remember in the old days, you created a ASP.NET Web Service. Now, I've been looking at WCF, but it seems like there's some added complexity. I've GOOGLED for some sample code, have 30 tabs open, but there's no consistency in what the best way is to do somethings: some examples are for .NET 2.0, .NET 1.1, etc. Any one know where some good simple CRUD-based examples are? (I've been scanning MSFT's site, but also haven't stumbled -- yet -- upon that golden article.)

Thanks

+1  A: 

A couple of things.

1) It's still OK to do Add -> New Web Service (asmx).

2) It's equally easy to do that with WCF (and it's still just SOAP).

The benefit of going WCF is that you're 'future-compatible' if you want to change some features (such as the transport type, etc).

Timothy Khouri
+1  A: 

I really think MSDN's Getting Started Tutorial is worthwhile. It walks you through defining a contract, implementing the contract, hosting the service, and then consuming it. It starts from zero and walks you through each step without wizards, so you get a feel for what you're doing and why. If you want more info, there are links to deeper treatments of each subject.

If all you'll ever do is expose a SOAP web service, WCF isn't really necessary. The old-school .asmx web services are still available in 3.5. The real strength of WCF shows when you realize you can expose the same contract implementation using anything from a binary protocol to various web protocols - hosted inside IIS or out. That's a whole lot of flexibility that may not even be valuable if you're already happy with SOAP.

Corbin March
A: 

Thanks guys. I'm just going to continue using the "old-school" asmx for this one, as this service won't need to ever be exposed as something other than SOAP. Now it's time to learn about this ADO.NET Entity framework or LINQ ORM mapping to a MySQL database to fill out my service implementation. Thanks.

taudep