WSIT with Tomcat and NetBean

While studying the world of interoperability in webservices stacks, after Axis2, I set up a environment with NetBeans 5.5.1 and Tomcat to test the stack from SUN : Metro and its interop component WSIT. After installing NetBeans and the WSIT module, you can easily create a new web application project and a webservice inside the IDE. But if you want WS-* capabilities you must add the WSIT runtime library to TOMCAT. The installation is simple (for JSE 6 there’s a trick) :

Then you can right click on the webservice in NetBeans and edit attributes, you have a WSIT tab (here I activate WS-Security with a username token, by default WSIT looks for the user in the tomcat-users.xml file but a validator class can be specified) :

wsit attributes

When you deploy the application, you see a JAX-WS deployment message but the wsdl doesn’t include the policy elements from WSIT (which are described in a xml file under the WEB-INF folder). Why ? Because the bundled Tomcat in NetBeans refers to two folders to configure the server : one in CATALINA_HOME and one in CATALINA_BASE (whih is under the .netbeans folder inside Document and Settings\YOUR_USERNAME). And in one of theses folders, the declaration to add the WSIT runtime jars is not included in catalina.properties.

it’s obviously more simple to use a fresh TOMCAT installation and copy the jars from WSIT and use this server in NetBeans. From here, you can encounter two problems :

build file modified

billet publié dans les rubriques coding le