We are required to call a webservice which is built on JDK1.6(the generated classes contain ENUM,Type casting..).But we are on JDK1.4 and we get compile errors because of these generics.So,I would like to know if there is any route which can support multiple version?without migrating to different version.
What kind of data does the web service return?
If it is XML or JSON, then it does not matter what version JDK the client uses since what it receives is textual data.
However, you may have to write more code to process the XML or JSON data in a JDK 1.4 environment. Alternatively, you can spend some time trying to find libraries that are compatible and help you process the data.
Joined: Apr 21, 2009
The data returned is of XML format.But when we try to import the generated objects,we get compile errors these are because of generics,array types etc.
May be I am missing a point here.Is there any documentation or an example which I can use as we reference.
Regarding the web service you are calling ... do you have a URL pointing to a wsdl?
If yes, then you can use wsdl2java (if the web service is developed in Axis 2) or an equivalent tool [b]supplied with the web service platform you are using[b] to generate your java code. For example, if you want to build an Axis 2 client, then the installation guide says that JDK 1.5 is required. So you can't use the wsdl2java distributed with Axis 2 because the generated code will probably include 1.5 specific code. Also note the SOAP versions supported by the web service that you want to consume. There may be compatibility issues there as well.
Or maybe the web service developers can provide you with a jar that has the stub code required to develop a client? If this is possible, then you can ask them to compile their code with the -target 1.4 option. Then you can use the jar with your 1.4 code and JVM.
Or you can search for 3rd party tools that support your need for different versions (of JDK, SOAP, etc.)
If you can provide some more specific information, then somebody in the group who has come across this situation may be able help you. But if you don't give the details, for example, you are using Axis version 23.43, NetBeans version 1.1, and whatever else, then it is impossible for readers to understand your exact situation. As a result, you will only get general answers. Hope that helped a little. Just some thoughts.