I generated a JAX-WS web service client using Netbeans, every thing works fine except if i add Axis2 library to the project the UsernameToken is removed from the soap header and the soap message looks slightly different. I'm quite new to Java web services so i would really like to understand what is going on and how to solve this. The reason why i need to have the Axis2 library is that I'm adding a client to an large project that has many Axis2 clients.
Yep, one of those moments where you learn that programming is hard. Normally the JAX-WS implementation as part of the JDK is used, but when you add Axis 2 apparently it is used as the JAX-WS implementation in stead and the results are different. There is no quick fix, the Axis 2 manual or an Axis 2 forum/mailing list is the place to look for info.