experience Gerd Saurer on 06 Jan 2008 03:00 am
Annotations & Java Web service Developer Pack
I was playing around with the Java Web services Developer Pack and BPEL nearly the whole evening now and some stuff really drive me crazy. Dealing with all the different Namespaces and the strange handling of the NetBeans IDE. I can’t understand why you close an wizard and just print an error message if there where something wrong with the input. You have to change step to the whole Procedure again and again.
I have not developed much in Java for some time now and most of the stuff was just straight forward but today I found something really interesting. You can put Annotations on parameters of methods. I never saw that in C# but you can do it there too. There are some advantages to use this technique but - is this readable anymore?

I don’t think so. An other thing I really don’t understand is why you have to use the @WebParam Annotation with the name Attribute if you want to see a parameter name different to ( par1, par2, …) in your WSDL. I mean who on earth likes that generic form of information where you have to search an api documentation again or in my case where i develop the services in parallel to the Process switch back to the service implementation to see if the first Parameter is the Address or the Packages? No IDE or program that uses the WSDL will be able to give you this information back. Thanks ![]()



on 06 Jan 2008 at 1:32 1.Rupert Meindl said …
For me the style seems not so alien. Because of the nature of WSDL you have to define a mapping between the service definition and the concrete implementation. Annotations on the parameter level make sense because they bind one side of the mapping so it is not so error prone as if you use strings. And if it is formatted nicely, you can read it ;-).
In the second part I do not understand the problem: if I build up a client for an WSDL defined interface my implementation will always use the information exposed by the interface description and it does not matter how the service is implemented at all.