What is the difference between building a WSDL in Eclipse and using WCF? - wcf

I'm somewhat familiar with WCF in that I can build Web Services in VS.Net ... I understand some of the concepts...
But, the other day I cam across this option in Eclipse (I also use Java to code) to create a WSDL. Playing around with it it looks great since it has a GUI method of building itself.
I guess I just wanna know what the difference is.
1) Are they different technologies like WSDL vs WCF? Or, is it that WCF uses WSDLs?
2) I read that WSDLs are a top-down approach... so what about WCF, is that top-down or is that bottom-up?
3) Will this WSDL in Eclipse actually be able to generate CSharp code for my server and client efficiently, or will it require a lot of fixing?

Windows Communication Framework and other services frameworks use standards like the Web Service Definition Language to communicate specifications.
WSDL is neither inherently top-down nor bottom-up. You can do it either way; that is, you can design your interface using WSDL and then code your service to the WSDL, or you can design your application and use a tool like those built into Visual Studio and Eclipse to automatically generate the WSDL. There are pros and cons (and proponents and opponents) to both approaches.
IDEs like Visual Studio and Eclipse usually do a good job (probably better than humans) of generating WSDL. I haven't used the Eclipse plugin for C# (I'm assuming there is one and that's what you're using if you want to generate C# in Eclipse), so I can't speak for its functionality.
EDIT: I answered question 3 backwards, but the answer still applies. The WSDL-to-code generators also generally do a good job just like the code-to-WSDL generators.

Related

API Automation through Java or Postman

In my company we use Ruby to create a framework for API automation and I have heard we can automate using Postman or SoapUI. So why do we have to create a automation framework when we already have tools for it?
It is like a buying a suit at the clothes shop versus going to a tailor to get a suit that is measured especially to your needs.
Using an existing tool will require less initial setup, you will have access to a lot of commonly needed features, without reinventing the wheel. For instance, in Postman there are available test snippets that you can use with little or no programming knowledge. Tools such as ReadyAPI, Katalon Studio, Robot Framework, SoapUI, etc. usually don't have a too steep of a learning curve, compared to developing a customer automation framework from scratch.
Using tools is fine, especially if you understand how they work in the background and have analysed the testing needs for your particular project. For example, a tool like REST Assured makes writing tests for RESTful webservices very easy, but it's actually very complex in the background.
You would build an inhouse automation framework if after researching the existing solutions, you realize they don't fully provide all that you need. A well designed/architectured framework will be far more customizable than any other tool, although it will require more initial work and maintenance as well.
In terms of using a custom test automation framework your testers will generally have to be more technical, more like SDETs rather than typical testers, but does not always has to be the case - I have seen automation frameworks build by developers and the testers would only write tests inside it by re-using the methods in the framework.
Lastly I would advise you to do some experimentation, try one of the commercial or Open Sources tools for API testing and after doing some testing with it try doing the same with a more hands-on approach, like using Python's Request client Apache Http client for Java, but every language has it's equivalent.

can Dart be used for basic CRUD web application?

I just discovered this Language and I'd like to know if it's possible to make basic CRUD web app using a database.
There are libraries for mysql and postgresql, and the core library provides a web server with HTTP, HTTPS and WebSocket support.
There is a templating library which isn't part of the official release. And, there is also a community mustache port (I don't think it builds at the moment, so you may need to fix it).
So it's definitely possible. But you'll be an early adopter. If you want to get stuff done quick, I'd choose something else, but if you're wanting to learn new skills, dive in.
Sure. It's a pretty new language though so you aren't going to find the robust library support you will in other languages just yet. It's rapidly growing however so I don't think it will be long. You can either write your server in dart or write your server in another language and expose a basic HTTP interface for your Dart client to consume.
Here is an example of writing a simple web application which creates and stores "blog" posts. Both the client and server are written in Dart. The database is MongoDB.
Also check out this question for more information.

Monotouch WCF Self-Hosted NetTCP Example

Can anyone point me to a WCF Self-Hosted NetTCP example that works on Monotouch? I've searched for many hours and have come up with nothing.
I need nettcp for speed reasons (I'm transferring a lot of data between an iPad and an XP machine). And I would much prefer self-hosting rather than using IIS to keep things simple.
Many thanks in advance!
MonoTouch does not support NetTcpBinding. MonoTouch supports the same bindings that are available in the Silverlight 3 Client Profile, which is limited to BasicHttpBinding.
Mono WCF implementation is open source (just like the rest of Mono itself). You can, and some people do, include their own (not the MonoTouch versions) assemblies into their applications. That allows them to use some features not available in the Silverlight subset.
However this is not a simple "add source and recompile" scenario. Honestly there are many other technologies available (and well tested/supported) that could likely fit your requirements. I would have a long look at them before investing many hours into providing your own assemblies.

Silverligtht WCF enabled service with Prism

Im required to write a Silverlight application using WCF.
I'm also required to use Dependency Injection to gain access to this service in another library.
(I add a Silverlight enabled WCF Service)
The problem is in trying to use Dependency Injection (Prism/MEF in this case). When I make a Silverlight Shared library that will have interfaces for this service, I cannot add this library in the ASP.Net project due to the fact that it is Silverlight library. If I make a non-Silverlight library I cannot add that library to other projects to share that common interface.
Basically I need a library I think to share between projects in Silverlight so I can do this service injection.
Any information is appreciated
As slugster said - this done via linking to windows library files from silverlight library.
You do it as described here: http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/01/20/linking-files-in-visual-studio.aspx
I just wanted to add.. Since you go there - what you need is another Framework/Technology. Usually those classes you talking about depend on other classes/namespaces that live in windows only or silverlight only world. And then you need to transfer object data via wire.
Microsoft's solution to this - RIA Services. What it does - it takes your Windows classes and generates proxy classes on Silverlight side. Kind of what you need. And it works with WCF services.
There is 3rd party solutions like CSLA and DevForce.
I use DevForce and it does many things automatically, but instead of generating proxy classes - it creates links just like what you want.
Whether you realise it or not, your question is a duplicate of this one: Shared data object between WCF service and Silverlight app While not asked the same way, the answer is the same.
You need to create a separate project, and share the code files (as links) from one project to the other. Your problem is that the Silverlight project is compiled for a different runtime to the ASP.NET/WCF project. Because they cannot reference a common library, linking the shared files as mentioned is the easiest way to share code between the two projects targetting different runtimes.

Best way to unit-test WCF REST/SOAP service while dynamically generating stubs

I have a webservice written with WCF 4.0 that exposes REST and SOAP functions, and I want to set up my unit tests so that as I work on my web services I can quickly test by having the test framework start up the service, outside of IIS, and then do the tests.
I want it to be dynamically generated as I am not certain what the interface will look like, and it is easier to not worry about having to generate the stubs before I start the tests.
But, I couldn't get Groovy to work with my web service, so I am curious if Iron Python or Iron Ruby would work well for this, or is there another .NET language that may work well for this.
SOAPUI can take your WSDL and/or WADL and general your first order tests. You can script up move complex usecase. It is easy to use but powerful through the use of Groovy or Java. It is without doubt the best test tool in this space.