Introducing WADL#

Of late I have been working on a small project which deals with C# code generation. I named it WADL# by the way most of the C#/.NET projects are names. If Apple products can start with i , GNOME with g, KDE with K and Windows with Win , then  I think WADL# is an apt name.

For all the people who have been working on .NET and web-services must be diving deep into SOAP based web-services. Right? How many of you know that SOAP based web services are not the only type of web-service which exist on this planet? How many of you have heard about RESTful web services? I know the fight between SOAP and REST is just like Emacs v/s Vim and GNOME v/s KDE and SQL v/s NoSQL. If someone worked on SOAP based web service, they must be familiar with WSDL. They added a “Web reference” and voila – Your IDE generated the client proxy for you.

For people in the RESTful world, don’t have something called WSDL. Sun came up with something called WADL. It is again a XML based representation of operations offered by the web-service. WADL doesn’t get so much of love since RESTful people are opposed to anything such as WADL. Whatever may be the case, WADL is still pending with W3C and not yet finalized. This makes the situation more complex for people from WSDL background who have been in a habit of getting their client proxy code. Hardly anyone looks at the actual XML. Why does it make the life tough? This is because I along with many people could not find any such code generators for WADL. After days of hunting I finally gave up.

I actually needed the WADL -> C# code generator as I wanted to write a client side proxy for Launchpad. After figuring out that LP provides a WADL, I started researching how to use it, but only in vain since no such code generators exist. This inspired me to write one of my own. I got the WADL schema, read the reference, sent some mails to launchpad-dev mailing list asking for clarification and finally came up with v0.1 of WADL#, download the assembly file.

I am still learning WADL and not everything is clear. There are many conflicts which might take time to grasp, but the current assembly works flawlessly for Launchpad WADL. Let me know if it fails for some WADL file which you provided. Take the pains to mail me the WADL file too. My email is mail at manishsinha dot net


This is no magic or rocket science. All you need to do it to call the Convert method of WadlConverter which implements IConverter interface. This means you need to use LpNet.WadlSharp.Common.WadlConverter class and call it’s Convert method. The signature of the method is

void Convert(string inputFileName, string outputFileName, string rootNamespace)

The explanation of the method:

  1. The first argument is the filename of the WADL file.
  2. Second argument is the filename of the .cs file. If the file does not exist, it would be created. If it does exist, it would be truncated and then overwritten.
  3. The third parameter is the name of the namespace which you would like the generated code to have.

Languages Supported:

WADL# uses CodeDom which is provided both in .NET and also Mono. WADL# can theoretically gen rate code for all languages which CodeDom can.

In reality, there is a small problem in the file Customizer.cs at line 215 where there is a hard coding for C#. Next release of WADL# will remove that.


WADL# uses Launchpad for development using the Bzr source control system. Get the code from trunk, make changes, push it and add it to merge queue. I love contribution and patches. 🙂


WADL# is an open-source project released under MIT/X11/Expat License. This means you can use it freely any way you like it provided you do not remove the Copyright notice. Know more about MIT License.

Just now I got a mail from Softpedia informing me that they have added WADL# to their repository of Linux Softwares.

Please don’t start with Mono and patents talk. Please point your browser to Slashdot, Hacker News, OSNews and Reddit for such discussions. You’ll get better responses in such places.

Please let me know if there is any mistakes on this post which includes typos, grammatical and factual ones. I would correct it at the earliest.

Update: I just got a backlink from a blog at on a post titled Bumper Crop of WADL Tools

Dousing the Mono Flames

The Free Software community is up in the arms and split into two factions on whether Mono is polluting the ecosystem? The discussions are endless and there is no hope that it will ever subside. I have been following ubuntu-devel-discuss and the topic “shameful censoring of mono opposition” has got the attention of nearly everyone on the list. I think save me, everyone has answered to that discussion. Heck! I am still getting mails now.

I find all these discussions to be getting out of control. Check and a tons of other sites. Mono supporters and mono haters are busy discussing whose stand is holier.


Let me be impartial. There is a threat that Microsoft may one day sue the FOSS companies on the use of it’s IP. Is it true? I don’t find Microsoft can do much as the bigger question is that can they sue each and every single user? They should sue Novell since they are leading the project. Will they sue each and every user out there using Mono?

The threats are more of speculations. Probably Ballmer can tell us what he thinks of Mono exactly, but for that he needs to find time from his busy schedule of dancing and throwing chairs.


Whatever Mono haters say, the reality is that there is no at par substitute for for GNOME applications like F-Spot, Tomboy and GNOME Do. I would be happy if GNOME is made mono free, but what about these three applications? When it comes to media player, I find Banshee much better than Rhythmbox. Amarok is much better but it is for KDE. I am talking about GNOME apps which don’t need KDE libs to be installed.

I don’t use Tomboy and F-Spot, but GNOME Do is really good. It saves a lot of time. The keybinding saves a lot of time. Everything need not be geek-oriented, but should be such that everyone can be use it. This is in accordance with GNOME Human Interface Guidelines

If anyone wants that GNOME should forget Mono we first need to find good substitutes of the above softwares. An alternative for Tomboy is Gnote. I agree it is lighter, but still it has a long way to go. If Gnote really kicks ass one fine day, that is a day for celebration for anti-mono campaigners.

Middle Ground

Time is money. Let us not waste time by just fighting who is correct and who is wrong. Mono lovers find the other camp stupid and vice-versa. Will the flame ever end? Mailing-lists are too busy these days discussing whether Microsoft can kill Linux by just issuing threats! So what can we do next?

Solution #1

Make it easy to remove Mono stack from GNOME. Probably make it dead easy to do so by including it in Synaptics.

Try issuing this command on the terminal

sudo apt-get remove –purge mono-common

and you get

The following packages will be REMOVED
banshee f-spot libart2.0-cil libavahi1.0-cil libboo2.0-cil libflickrnet2.1.5-cil libgconf2.0-cil libglade2.0-cil
libglib2.0-cil libgmime2.2-cil libgnome-vfs2.0-cil libgnome2.0-cil libgtk2.0-cil libgtkhtml3.16-cil
libmono-addins-gui0.2-cil libmono-addins0.2-cil libmono-cairo1.0-cil libmono-cairo2.0-cil libmono-corlib1.0-cil
libmono-corlib2.0-cil libmono-data-tds1.0-cil libmono-data-tds2.0-cil libmono-security1.0-cil libmono-security2.0-cil
libmono-sharpzip0.84-cil libmono-sharpzip2.84-cil libmono-sqlite2.0-cil libmono-system-data1.0-cil
libmono-system-data2.0-cil libmono-system-web1.0-cil libmono-system-web2.0-cil libmono-system1.0-cil libmono-system2.0-cil
libmono-zeroconf1.0-cil libmono1.0-cil libmono2.0-cil libndesk-dbus-glib1.0-cil libndesk-dbus1.0-cil libtaglib2.0-cil
mono-common mono-gac mono-jit mono-runtime tomboy

Which is enough to scare the shit out of you. Such a long list! Is the system going to break?

To solve the above problem Mark Packages By Task can be a good place to place Mono. Just Uncheck and Voila!

Mono should also find a place here
Mono should also find a place here

Solution #2

Accelerate Gnote development! Gnote is lighter, faster by still behind Tomboy when it comes to features. I personally prefer physical sticky notes at my workplace or at home. I am not here to discuss which one if better, the above is just my persona views and I hope many people agree with me.

I think Tomboy is like a flagbearer of Mono community. Like Linux is for FOSS. Of all my friends who know something about Mono know about Tomboy. Probably it us the other way round – due to Tomboy they came to know that something called mono exists.


I have worked on .NET on windows, but prefer Python on Linux. I also think that we can do without mono, but not at this situation when we don’t have better options to Tomboy, F-Spot and GNOME-Do. I always feel that discussing on the cleanliness of mono is required, but it should end somewhere or the other. Why keep it discussing it over ages? Whenever I read a mono v/s anti-mono thread, two thoughts come to my mind which I summarised above.