[ 
http://jira.codehaus.org/browse/XFIRE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_92152
 ] 

Taras Puchko commented on XFIRE-478:
------------------------------------

Running the geoip-client example on JDK 1.4:

1. Create a project directory and extract into the lib subdirectory of it all 
the jars from
   a) xfire-distribution-1.2.5.zip - http://xfire.codehaus.org/Download
   b) Retrotranslator-1.2.1-bin.zip - 
http://sourceforge.net/project/showfiles.php?group_id=153566
   c) apache-tomcat-5.5.23-compat.zip - http://tomcat.apache.org/download-55.cgi

3. Create build.xml in the project directory:

   <project name="XFireClient" default="build" basedir=".">
     <path id="classpath"><fileset dir="lib" includes="*.jar"/></path>
     <taskdef name="wsgen"
              classname="org.codehaus.xfire.gen.WsGenTask"
              classpathref="classpath"/>
     <taskdef name="retrotranslator"
              classname="net.sf.retrotranslator.transformer.RetrotranslatorTask"
              classpathref="classpath"/>
     <target name="build">
       <delete dir="build" failonerror="false"/>
       <delete dir="dist" failonerror="false"/>
       <mkdir dir="build"/>
       <mkdir dir="dist"/>
       <mkdir dir="build/gen-src"/>
       <mkdir dir="build/gen-classes"/>
       <mkdir dir="build/classes"/>
       <mkdir dir="build/jars"/>
       <wsgen wsdl="geoip.wsdl"
              outputDirectory="build/gen-src"
              package="net.webservicex.geoip.jaxb"/>
       <javac srcdir="build/gen-src" destdir="build/gen-classes" 
classpathref="classpath"/>
       <jar basedir="build/gen-classes" destfile="build/jars/geoip.jar"/>
       <copydir src="lib" dest="build/jars" />
       <retrotranslator>
         <jarfileset dir="build/jars" includes="*.jar"/>
       </retrotranslator>
       <copydir src="build/jars" dest="dist" />
     </target>
   </project>

4. Copy geoip.wsdl from XFire to the project directory and run Ant.
   Use jars from the dist subdirectory to compile and run the example:

   import net.webservicex.geoip.jaxb.*;
   public class GeoIPClient {
       public static void main(String[] args) {
           System.out.println("java.version = " + 
System.getProperty("java.version"));
           GeoIPServiceClient service = new GeoIPServiceClient();
           GeoIPServiceSoap geoIPClient = service.getGeoIPServiceSoap();
           String address = args.length > 0 ? args[0] : "216.73.126.120";
           System.out.println("The country is: " + 
geoIPClient.getGeoIP(address).getCountryName());
       }
   }


> java.lang.UnsupportedClassVersionError: org/codehaus/xfire/gen/WsGen 
> (Unsupported major.minor version 49.0)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: XFIRE-478
>                 URL: http://jira.codehaus.org/browse/XFIRE-478
>             Project: XFire
>          Issue Type: Test
>          Components: Generator
>    Affects Versions: 1.1, 1.1.1
>         Environment: WinXpPro v5.1 sp2; jdk142_05; xfire-1.1.1
>            Reporter: Jurgen Stoop
>         Assigned To: Dan Diephouse
>             Fix For: 1.1, 1.1.1
>
>
> I'm trying to generate client classes for Jdk1.4
> I've got the well known version difference problem, but it's not the same as 
> other support requests, because I'm getting it on class WsGen.
> I've read that there is a chance of jdk clashes but I suspect it's not the 
> case here because I'm using a direct path to the java.exe.
> My command line:
> Y:\bea814\jdk142_05\bin\java -cp 
> ;C:\xfire-1.1.1\xfire-all-1.1.1.jar;C:\xfire-1.1.1\modules\xfire-generator-1.1.1.jar;Y:\apache-ant-1.6.2\lib\ant.jar
>  org.codehaus.xfire.gen.WsGen -wsdl EFCDocumentHandler.wsdl -o . -p 
> com.aigfpc.efc.documenthandler
> The output:
> Exception in thread "main" java.lang.UnsupportedClassVersionError: 
> org/codehaus/xfire/gen/WsGen (Unsupported major.minor version 49.0)
>         at java.lang.ClassLoader.defineClass0(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
>         at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
>         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to