Search code examples
javaeclipsekernelapache-axisbuildpath

Axis2 issue with version of Axis Kernel - how to reference another project from your java project


1) I have old project that I need to modify. I need to add new web service. And I am having issues with some jar files.

I have created new service (Axis2), then I used Eclipse wizard to create Web Service Client code. Everything looks fine, except when my MyServiceStub.java showed up inside client java project, it failed to find some libraries.

I looked at few of them and it seems it is looking for Axis2-kernel-1.6.0.jar. Currently in my old project I see Axis2-kernel-1.3.0.jar and it seems that existing OtherServiceStub.java file there is using this Axis2-kernel-1.3.0.jar.

The first thing that dropped on my mind is that previously web services were created with earlier version of Axis2. My current version is 1.6. The thing, I really don't understand is why in Project Facets it is telling me that Axis2 is of version 1.1....

Ideally, I would like to use Axis2-kernerl-1.3.0.jar, becase I want to keep changes to minimum. What Version of Axis2 do I need? Any advice how to solve my problem?

And ...

2) If I have 2 projects, how can I automatically reference JAR of one project in another one, so when I make changes in referenced project, I see them effective when runing in project that is referencing? Right now, I export project to JAR, then I manually copy JAR (overwrite) to folder of the project that needs it.


Solution

  • 1) You need to use whatever version of the kernel axis2 web service is currently running, ie wherever this is deployed to has a kernel version. You want your client code to talk to the server in the same version of axis basically.

    You can download old releases here http://axis.apache.org/axis2/java/core/download.cgi

    2) Running vs debugging is different. If you are running axis2 on a server, not inside of eclipse, your best option is to export the jar and upload to the axis2 WEB-INF/lib directory. That way you can have a copy you debug and code upon, separate from the copy that is actually running.