0

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.

tshepang
  • 12,111
  • 21
  • 91
  • 136
bobetko
  • 5,019
  • 14
  • 58
  • 85

1 Answers1

1

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.

Keith
  • 310
  • 4
  • 10
  • From old stub file I figured version of Axis2 that was used, which was 1.3... which is already specified in "Axis2-kernel-1.3.", I didn't connect dots... :-). I had a lot of issues downgrading to 1.3. Eclipse simple didn't want to forget it. Even after I removed axis2-1.6 from my pc and removed references from Eclipse preferences, Eclipse still kept using Axis2-1.6 to generate client code. I had to recreate Workspace to finally get rid of 1.6... now all works fine. – bobetko Apr 10 '12 at 14:11
  • Question 2 is not connected to axis2. I simply have 2 JAVA projects and one is referencing another one. I am wondering is there a way to avoid manual export of jar file (of referenced project) and manually moving it to project that makes reference. That's what I do now. In Build Path, there is option to reference other projects I have in workspace, but that seems not to do anything... – bobetko Apr 10 '12 at 14:19
  • You really need a new question for that, but if you aren't exporting the jar, then wherever you are running the code from, needs to have the class files available for both projects. I don't understand your question completely, so its best to start a new thread if you still need help. – Keith Apr 10 '12 at 14:27