Skip to content

Index

SOAP Headers supports

It's been a long time since I last posted a technical post. This post will deal with how the current Web Services framework deals with soap headers. More specifically, how does the .Net framework and GlassfishJAX-WS RI (J2EE ->JEE Reference Implementation) deals with those. As it deals with a new subject in this blog (Web Services), let me first speak about the background before dwelling in the real subject. Background Today most Web Services uses the WSDL, UDDI and SOAP over HTTP protocols to work. WSDL is a xml based language to describe what a web services supports, SOAP is an xml based protocol designed to exchange messages, if possible compliant with the WSDL contract. SOAP messages are composed of a body and header. The W3C recommended use is: data (payload) in the body and metadata (authentication, session ...) in the header.

Defining Soap header

IBM published a very interesting resource on how to define soap headers in the WSDL contracts. To put in a nutshell, there is two ways to define soap headers: either explicit or implicit.
Explicit, the headers are considered to be part of the input message of operations. The difference is made in the binding. Implicit, the headers are defined in separate messages and are defined to be input of operations in the binding.

Current framework support

I have recently noticed that the support of both WSDL constructions greatly differ between the .Net and JEE RI frameworks. I have defined two WSDL files, one with explicit soap headers, and the other with implicit header. I used the .Net framework wsdl.exe tool to create both client and server source stub/interface and I used the wsimport.exe tool (JEE RI) to do the same for the java platform. While the .Net framework can handle both explicit and implicit construction, the JEE RI doesn’t add the headers when the WSDL defines implicitly the headers. Therefore, one has to manually add the headers parameters to every function.

A possible fix

If JEE RI doesn't support implicit construction, a possible fix would be to always add explicit headers. Saddly, the .Net framework generated WSDL files defines implicit headers. Thus JEE RI won't be able to automatically consume .Net WSDL files.

My Conclusion

Despite all the works on both sides to improve JEE/.Net interoperability (WSIT, project Tango), and despite the WS-I work; consuming Web Services endpoints created in a language in the one might still be problematic when using soap headers.

Agile before it's time

Nowadays, more and more people seems interested in Agile and XP. The basic idea is to split projects into a bunch a little projects with very short deadlines. Agile commonly emphasizes the downsizing of documentations (User Requirements, Functionnal specifications) and advocate more feedbacks from the final users/buyers. [From I got of a DotNetRocks podcast, you might want to read the transcript or listen to to the full podcast. Really interesting] I recently found an intersting ressource, Jack W.Reeves talking about software development in the early 90s and already introducing some Agile concept before it even got a name. You will find this very interesting discussion at : http://www.developerdotstar.com/mag/articles/reeves_design.html

Google IG now features theme

For those of you who use the personalized Google homepage (http://www.google.com/ig), you may have recently noticed a new feature:
The possibility to change the appearance of the page, it’s called “select a theme” and you can find it near the “add stuff” link. Previous solution was already available to modify the appearance of this page but they weren't always that functional. Some needed User script to be hosted by the browser; others messed up the page more than they customized it. While this new feature is not a mandatory feature for a good homepage, I liked to have the opportunity anyway. Moreover the available themes change with your local weather, nice indeed. Here is a composite of the different picture I have had today. There are 6 themes to start with, but I am sure Google will provide us with new one or allow users to create new one. I noticed this new feature this morning, some may not have access to it yet (so said a friend of mine) I guess you will just have to be patient.

News

I haven't post anything in a while. To make it short, I am now doing an internship in the USA (Virginia USA). I should come back in Europe by August-September. I hope I'll be able to find a work in Finland or Sweden. My current work is to develop a standard corporate web service development guideline. I spent a  lot of time dealing with web services interoperability (mostly, the WS-I effort and it's Basic Profile) and now I am dealing with the java J2EE web services stacks. Don't be surprised if many future posts on this blog deals with web services.   Last but not the least, I bought a domain name and developed a small personal web site http://jonathanroussel.com. It's not much but at least my name is enough to find me on the Internet. Talking about this domain name, this blog is now accessible as a subdomain at http://blog.jonathanroussel.com.

Chat4Lan dotNet Client first release

Two fellow students and I have been working on a protocol, a dotNet client and a java Client designed to allow Instant Messaging on a LAN without any server being needed. This very simple protocol uses UDP multicasting possibility for peer discovery. AES is also used for basic encryption of all text exchanged against eavesdropping. The protocol is currently in version 2.0, and the dotNet client for this version is usable. Thus we have decided to release a version. The binaries, source-code and documentations are available on sourceforge.net at: http://sourceforge.net/projects/chat4lann/

Wiki, meet MSDN. Hurrah for the MSDN Community Content

Most of you probably know the Microsoft MSDN, and if you’ve ever programmed for the Windows platform you have most probably used the library. It provides information on Microsoft Products (COM, MFC, .Net …) as well as more general knowledge (programming practices, networking, multi-threading …). I definitely like this library; however some articles are poorly documented or feature no or few examples. Until now you had no choice but to go take a look on other websites for those examples you desperately need. This time may have come to an end with the new Microsoft step toward the social web: MSDN Community Content or MSDNWiki. As of now anyone can add content to the MSDN library. However don’t get fooled by the name, it’s not a Wiki, you can’t add article, remove others contributions, you have to login with a live ID… it’s just a way for developers to share their knowledge inline. If you want to try, just look for the “Add new Community Content” at the top and bottom of each page. More information on the MSDN page about MSDNWiki

Reading office 2007 file with 2003

With the recent release of the new Office 2007, one may expect more and more .docx, .pptx , ... file to be exchanged. For those already using 2007 no problem; but most people will wait before switching to 2007 (maybe for a new computer purchase). So Microsoft has provided us with a plug-in for Office 2003 which enables us to read/write .docx and other new file formats. You will find this genuine tool there on the micosoft website. Another tip: *.docx, *.pptx, files are just a bunch of .xml and image files archived in a zip file. When such a file is corrupted, one may try uncompressing the file and modifying the corrupted xml before archiving everything back.

Java meets Vista

Here it is finally, the new Java Standard Edition 6. According to Sun this version brings a lot of new or enhanced features. One may think of the enhanced Web Services and AWT/Swing (I plan to take a look at those two). However some features are not only intended for developers, support for Windows Vista is such a feature. Yes, you may finally run java (application or applet) on your Windows vista without getting upset at the “The color scheme has been changed to Windows Vista Basic” stuff. Hurrah for Java under Aero Glass. Well, I am still waiting for some other applications to become fully Vista compliant (thinking of the Zen Creative Suite right now) but that’s a huge step forwards considering the number of java Web Sites and Applications out there. You will find this new release http://java.sun.com/javase/downloads/index.jsp PS : Only Java Standard Edition (JSE) is available in version 6, Java Micro edition (JME) and Java Enterprise Edition(JEE) 6.0 has not yet been released.

First English post

I have finally decided to write in English instead of French. Among other motives is the fact that I am soon going to the USA for a 6 month internship. I will leave in February for Centreville (just south of Washington DC) to work on a Service Oriented Architecture. I can’t wait, both to work on a SOA and to live in the USA. You may have also noticed that I haven’t written any post since quite a long time. I hope I will be able to post more often in the future. I haven’t had (neither did I took it) to write post because I have been involved in time consuming projects lately.

  • An Instant Messaging Protocol and a .net client for this protocol. This protocol offers some interesting (well, at least, so I Hope) features. It’s a server less protocol with automatic discovery of chat partners on the LAN. It also (we are on working on it) implement security features (symmetric and asymmetric encryption with AES and RSA). A java client is also being developed by a friend mine. This project is open-source. A .net library is available for those who want to create quickly a new client without worrying for network programming. No file release has yet been made ( I plan to do one in a few days) but you can check the protocol definition and the source code at : http://sourceforge.net/projects/chat4lann/

  • I am working on a new website to host this blog. The blog you are currently reading is hosted by blogger.com, the design blogger’s as well. My new website will host two blog (personal and professional) along with a place to publish my articles. I am currently working on the look of this website, and then I will work on the database. I plan to buy a domain name for this website but I am still looking for a good DN. What about joesspot.com ?

Le nouveau C++ : C++0x

Le C++ standard commence à se faire vieux. Bien que la version actuelle ne date que de 1998 (C++98), de nombreux défauts commencent à se faire sentir. Après avoir gouté aux joies de langages plus faciles d’accès (C# et Java *), il est difficile de retourner au C++ standard. Bien sur les avantages du C# et Java sur le C++ s’expliquent par le fait qu’ils ne soient pas comparables… Les deux premiers sont plus faciles d’accès en premier lieu parce que ce ne sont pas que des langages, ce sont aussi des plateformes de programmation complète (les machines virtuelles Java et .NET avec les collections d’objets associés). Ainsi, pas besoin de chercher quel API utilisé pour réaliser ses GUIs, parsing XML, accès aux web services, … tout ce qu’il faut pour réaliser la base de ces programmes est fournie. Le C++ standard lui nécessite de nombreuses librairies avant de pouvoir réaliser quelque chose. C’est tout à la fois la force du C++ (possibilité de l’utiliser pour faire à peu prés tout et n’importe quoi sur n’importe quelle plateforme, une fois munie de la bonne libraire) et sa faiblesse. Cependant, je pense que même sur un plan plus comparable de nombreux reproches sont à faire au C++. L’absence de gestion automatique de mémoire, une syntaxe parfois lourde (essayer de faire un template de template puis d’itérer dessus). Bref le C++ en l’état n’est clairement pas mon langage de choix pour le développement. Cependant le comité de standardisation du C++ s'est remit au travail après quelques années de silence. Ce comité est en train de travailler sur les spécifications du nouveau C++, le C++0x avec peut être le 9 en lieu et place du x (encore 3 ans à attendre …). Cette nouvelle déclinaison du C++ me parait très prometteuse. Le créateur du C++ (Bjarne Stroustrup) fait partie du comité et milite activement pour l’intégration de plus de librairies :

  • gestion des Threads
  • expressions régulières
  • ajout de containers à la stl actuel
  • fonctions mathématiques
  • pointeurs intelligents
  • éventuellement mais peu crédible GUI
  • ...

Bref beaucoup de choses très utiles, notamment les « smart pointers » (sans doute issue de la librairie de Boot) qui offre une méthode pour la gestion automatique de mémoire. Certes le comptage de référence (si je ne m’abuse les pointeurs intelligents ne savent guère faire plus en matière de gestion automatique), est moins simple qu’un garbage collector (Java, C#, …) mais cela reste un grand pas en avant. Ce nouveau standard doit aussi apporter de nombreuses facilités syntaxiques :

  • fonctions anonymes
  • for-each
  • itérateur de type « auto »

Ces « Syntaxic sugar » devraient grandement améliorer la facilité d’écriture et de lecture du code source. Pour en savoir plus :

* : J’ai volontairement omis de parle de langages encore plus haut niveau comme le python, tout d’abord parce que je ne les connais pas suffisamment, mais aussi parce qu’ils ne me paraissent pas destiné aux mêmes usages.