*
The moose likes Web Services and the fly likes Webservice Provider and Client version Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice Provider and Client version" Watch "Webservice Provider and Client version" New topic
Author

Webservice Provider and Client version

sivaprasad pasupulathi
Ranch Hand

Joined: Apr 21, 2009
Posts: 36
Hi,

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.

Thanks
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
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.
Best wishes!
sivaprasad pasupulathi
Ranch Hand

Joined: Apr 21, 2009
Posts: 36
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.


Thanks
R Srini
Ranch Hand

Joined: Feb 19, 2010
Posts: 215
Hi. You can do this in a few different ways.

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webservice Provider and Client version
 
Similar Threads
Webservice - WSDL or Java Class
multiple wsdl file
Ant servicegen
webservice access in different versions of WAS server
what is the lates stable version in jboss?