PEBKAC

« Back to blog

Configuring Eclipse with Axis2 and Tomcat to create a SOAP web service client

I recently had to create a client for an Axis2 based SOAP web service and it took me a couple of hours to get the development environment functioning. I searched around the web to find a tutorial but all I could find were bits and pieces of information, so here's a complete guide to configuring Eclipse to get the development going.

Step 1) Get Eclipse for Java EE Developers. If you already have it, make sure it's up to date.

Step 2) Go to 'Window -> Preferences -> Web Services -> Axis2 Preferences'. Download the latest binary for Axis2 and add it's location there.

Step 3) Go to 'Window -> Preferences -> Server -> Runtime Environment'. Download the latest binary for Tomcat and add a runtime environment pointing to it's location.

Step 4) Go to 'File -> New -> Other -> Web Services -> Web Service Client'. On the next screen, you'll see some links under 'Configuration:'. Make sure your server runtime is the runtime with the latest Tomcat and the web service runtime is Axis2.

That's it. Things should work now, write a dummy class to read from your WSDL file to check functionality. During execution, you might be prompted that you're missing some files. Some of them are as follows:
JavaBeans Activation Framework activation.jar | Download
JavaMail API mail.jar | Download
Jakarta httpcore HttpResponseFactory | Download
These can be added by Right clicking on your project 'Properties -> Java Build Path -> Libraries -> Add External JARs' and then feed in their locations.

Now you get to the best stuff, actual development.

Posted July 2, 2010