File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How to generate Java 1.4 specific code from Axis2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to generate Java 1.4 specific code from Axis2" Watch "How to generate Java 1.4 specific code from Axis2" New topic
Author

How to generate Java 1.4 specific code from Axis2

Kousik Majumder
Ranch Hand

Joined: Sep 30, 2007
Posts: 229
Hi,

I am using axis2-1.4.1 to generate java classes from wsdl. JAVA_HOME is set to version 1.4.
My problem is that when axis2 is generating java classes it is generating java 1.5 specific code.

Can somebody tell me what else to configure so that Axis2 create my classes to java 1.4 compatible?


Thanks in Advance,
Kousik
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
Wouldn't the simplest thing be to switch to a current version of Java?

Java 1.4 hit "end of life" in October 2008. You are going to have nothing but trouble trying to use modern toolkits such as Axis with version 1.4.

Bill
Kousik Majumder
Ranch Hand

Joined: Sep 30, 2007
Posts: 229
Hi,

As because it is the requirement to use only java 1.4 so for the time being I need to forget about java 1.5 or above. There should have been a way where Axis2 will only generate java 1.4 specific code.

Please suugest anyone.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
There should have been a way where Axis2 will only generate java 1.4 specific code.

Why? The Axis2 home page states very clearly: As of Axis2 1.5, we now require JDK 1.5 or above. JDKs 1.4 or previous are no longer supported. If you want to use an obsolete JRE, then you'll need to use obsolete SOAP stack that runs on it, like Axis 1. That won't support current APIs like JAX-WS, of course, but that's the price you pay.
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Kousik Majumder wrote:Hi,

I am using axis2-1.4.1 to generate java classes from wsdl. JAVA_HOME is set to version 1.4.
My problem is that when axis2 is generating java classes it is generating java 1.5 specific code.

Can somebody tell me what else to configure so that Axis2 create my classes to java 1.4 compatible?


How do you generate the client code - via ANT or a command line ??

Are you 100% sure that the used JAVA_HOME is 1.4 - and not 1.5 ??

If you are using ANT then you can set the 'target'/'source' option to 1.4 on the <java ...> task.


Regards, Rene Larsen
Dropbox Invite
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Lester Burnham wrote:
There should have been a way where Axis2 will only generate java 1.4 specific code.

Why? The Axis2 home page states very clearly: As of Axis2 1.5, we now require JDK 1.5 or above. JDKs 1.4 or previous are no longer supported. If you want to use an obsolete JRE, then you'll need to use obsolete SOAP stack that runs on it, like Axis 1. That won't support current APIs like JAX-WS, of course, but that's the price you pay.

He is not using Axis2 1.5 - but 1.4.1 - so JDK 1.4 should be supported.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to generate Java 1.4 specific code from Axis2