Details
Description
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)
Activity
retrotranslator can't convert javax.jws.soap.SOAPBinding; and other JAXB 2 types to JAXB 1, etc. So this is an illusion. I'm logging a request to support JAXB 1, as long as you support that, 1.5 requirement won't matter. If you don't support that, people can't Use WsGen w/ WebSphere 6, which is a big hit.
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)
}
ant sample given doesn't work.
Same in mvn, also fails:
org.apache.maven.BuildFailureException: There are test failures.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:403)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
I don't see how this can work, when annotations are discarded by retrotranslator, and when generating a service, classes like javax.jws.soap.SOAPBinding are still used by the code.
I didn't try the maven plugin, but the ant script worked for me. What exactly does not work? Are there any stack trace with the ant example?
Annotations are retained by retrotranslator but converted to plain interfaces. So you need to translate the jar with javax.jws.soap.SOAPBinding (xfire-jsr181-api-1.0-M1.jar) to be able to use it. The above example translates every jar so the whole "assembly" works.
A. After retrotranslating the classes and test class to 1.4, the exception is:
Time: 0.219
There was 1 error:
1) testClient(net.webservicex.geoip.GeoIPClientTest)java.lang.UnsupportedClassVe
rsionError: org/codehaus/xfire/annotations/jsr181/Jsr181WebAnnotations (Unsuppor
ted major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
7)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:474)
at java.net.URLClassLoader.access$500(URLClassLoader.java:108)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:846)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:389
)
at java.net.URLClassLoader.findClass(URLClassLoader.java:370)
at java.lang.ClassLoader.loadClass(ClassLoader.java:562)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:442)
at java.lang.ClassLoader.loadClass(ClassLoader.java:494)
at net.webservicex.geoip.jaxb.GeoIPServiceClient.create1(GeoIPServiceCli
ent.java:57)
at net.webservicex.geoip.jaxb.GeoIPServiceClient.<init>(GeoIPServiceClie
nt.java:26)
at net.webservicex.geoip.GeoIPClientTest.testClient(GeoIPClientTest.java
:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:60)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
B. After retrotranslating the classes and test class to 1.4, and running w/ java 1.5+, the exception is:
Time: 0.375
There was 1 error:
1) testClient(net.webservicex.geoip.GeoIPClientTest)org.codehaus.xfire.annotatio
ns.AnnotationException: Class net.webservicex.geoip.jaxb.GeoIPServiceSoap does n
ot have a WebService annotation
at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(Annota
tionServiceFactory.java:287)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(Object
ServiceFactory.java:365)
at net.webservicex.geoip.jaxb.GeoIPServiceClient.create1(GeoIPServiceCli
ent.java:59)
at net.webservicex.geoip.jaxb.GeoIPServiceClient.<init>(GeoIPServiceClie
nt.java:26)
at net.webservicex.geoip.GeoIPClientTest.testClient(GeoIPClientTest.java
:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
C. W/o retrotranslating the test class, but only retrotranslating classes to 1.4, and running test w/ 1.5+, the exception is:
Time: 0.36
There was 1 error:
1) testClient(net.webservicex.geoip.GeoIPClientTest)org.codehaus.xfire.annotatio
ns.AnnotationException: Class net.webservicex.geoip.jaxb.GeoIPServiceSoap does n
ot have a WebService annotation
at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(Annota
tionServiceFactory.java:287)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(Object
ServiceFactory.java:365)
at net.webservicex.geoip.jaxb.GeoIPServiceClient.create0(GeoIPServiceCli
ent.java:59)
at net.webservicex.geoip.jaxb.GeoIPServiceClient.<init>(GeoIPServiceClie
nt.java:26)
at net.webservicex.geoip.GeoIPClientTest.testClient(GeoIPClientTest.java
:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
After retrotranslating all of the dependencies obtained w/ dependency:copy-dependencies, i get the following, which, despite apparent progress in the execution path, tells me that it might not be possible to feasibly get this retrotranslated to 1.4 all the way:
Time: 11.344
There was 1 error:
1) testClient(net.webservicex.geoip.GeoIPClientTest)java.lang.NoClassDefFoundErr
or: javax/xml/datatype/DatatypeConfigurationException
at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeT
ypeInfoSetImpl.java:25)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(
RuntimeModelBuilder.java:77)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(
RuntimeModelBuilder.java:40)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.<init>(ModelBuilder.java:
97)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.<init>(RuntimeMode
lBuilder.java:43)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContex
tImpl.java:344)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.ja
va:216)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
76)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
55)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:60)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
at org.codehaus.xfire.jaxb2.JaxbType.getJAXBContext(JaxbType.java:303)
at org.codehaus.xfire.jaxb2.JaxbType.readObject(JaxbType.java:184)
at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBind
ingProvider.java:162)
at org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBindi
ng.java:206)
at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(Wrapped
Binding.java:50)
at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandle
r.java:42)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.jav
a:131)
at org.codehaus.xfire.client.Client.onReceive(Client.java:387)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChann
el.java:139)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:4
8)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.j
ava:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.jav
a:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
at org.codehaus.xfire.client.Client.invoke(Client.java:335)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77
)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy8.getGeoIP(Unknown Source)
at net.webservicex.geoip.GeoIPClientTest.testClient(GeoIPClientTest.java
:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:60)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
I think there might be some requirement for certain jars to go into <JRE/>/lib/endorsed, but i don't know if that's what this is about, and if it is what jars to endorse.
This is the approach i used:
1. add retrotranslator config below.
2. mvn dependency:copy-dependency
3. mvn package
4. cd target\test-classes
5. update paths in and run .bat below.
1) retro config:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>retrotranslator-maven-plugin</artifactId>
<executions>
<execution>
<id>retrotranslate-classes</id>
<phase>process-classes</phase>
<goals>
<goal>translate</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>
$
</directory>
<includes>
<include>*/.class</include>
</includes>
</fileset>
</filesets>
<verbose>true</verbose>
</configuration>
</execution>
<execution>
<id>retrotranslate-dependencies</id>
<phase>process-classes</phase>
<goals>
<goal>translate</goal>
</goals>
<configuration>
<jarfilesets>
<jarfileset>
<directory>target/dependency</directory>
<includes>
<include>*/.jar</include>
</includes>
</jarfileset>
</jarfilesets>
</configuration>
</execution>
<execution>
<id>retrotranslate-tests</id>
<phase>test-compile</phase>
<goals>
<goal>translate</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>
$
</directory>
<includes>
<include>*/.class</include>
</includes>
</fileset>
</filesets>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
4) .bat:
set CLASSPATH=
set CLASSPATH=.;
set CLASSPATH=%CLASSPATH%;..\classes;
set CLASSPATH=%CLASSPATH%;"..\dependency\XmlSchema-1.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\activation-1.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\ant-1.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\commons-attributes-api-2.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\commons-beanutils-1.7.0.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\commons-codec-1.3.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\commons-httpclient-3.0.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\commons-logging-1.0.4.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\jaxb-api-2.0.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\jaxb-impl-2.0.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\jaxb-xjc-2.0.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\jaxen-1.1-beta-9.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\jaxws-api-2.0.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\jdom-1.0.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\jsr173_api-1.0.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\junit-3.8.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\mail-1.4.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\qdox-1.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\servlet-api-2.3.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\spring-1.2.6.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\stax-api-1.0.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\stax-utils-20040917.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\wsdl4j-1.6.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\wstx-asl-3.2.0.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xbean-2.2.0.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xbean-spring-2.8.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xercesImpl-2.6.2.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-aegis-1.2.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-annotations-1.2.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-core-1.2.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-generator-1.2.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-java5-1.2.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-jaxb2-1.2.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-jsr181-api-1.0-M1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-spring-1.2.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xfire-xmlbeans-1.2.5.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xmlParserAPIs-2.6.2.jar";
set CLASSPATH=%CLASSPATH%;C:\development\tools\Retrotranslator\Retrotranslator-1.2.1-bin\retrotranslator-runtime-1.2.1.jar;
set CLASSPATH=%CLASSPATH%;C:\development\tools\Retrotranslator\Retrotranslator-1.2.1-bin\retrotranslator-transformer-1.2.1.jar
C:\development\java\jse\j2sdk1.4.2_13\bin\java -cp %CLASSPATH% junit.textui.TestRunner net.webservicex.geoip.GeoIPClientTest
java.lang.NoClassDefFoundError: javax/xml/datatype/DatatypeConfigurationException means you haven't put into the classpath the xml-apis.jar and xercesImpl.jar from apache-tomcat-5.5.23-compat.zip.
The Tomcat itself puts them into the endorsed directory but the geoip-client example works even when they are on the classpath.
You don't have to use apache-tomcat-5.5.23-compat.zip if you update xml-apis-1.0.b2.jar and xercesImpl-2.6.2.jar that comes with XFire-1.2.5 with the following files and add them to the classpath:
http://repo1.maven.org/maven2/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar
http://repo1.maven.org/maven2/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar
Thanks for the feedback.
I got this client example to work by adapting the suggestions about the 2 jars as follows:
a. add the following to pom.xml:
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.1</version>
</dependency>
b. add the following to .bat:
set CLASSPATH=%CLASSPATH%;"..\dependency\xercesImpl-2.8.1.jar";
set CLASSPATH=%CLASSPATH%;"..\dependency\xml-apis-1.3.03.jar";
It's encouraging that this client example now works after retrotranslation. I'll try something like this w/ my actual web service, and hope it works for a service as it does for a client.
Forgot to mention, mvn's executions of tests actually still fails, but i'm not getting stuck on that right now, cause manual invocation of the test succeeds. I think the reason mvn test run fails is because it runs in 1.5+ JRE required for the build, which invokes different APIs. Thus, one limitation of this approach is mvn-based testing would have to probably not be used, unless there is a way to change the PATH and put a 1.4 JRE's bin on it before it.
To run an XFire service on Java 1.4 you may need to set a property: java.class.version=49.0
See http://jira.codehaus.org/browse/XFIRE-650
I've tried a web service w/ retrotranslator that just uses an enum, and everything is retrotranslated to 1.4: no annotations in my source. Set up for JAXB 2 service factory.
i get the following exception, despite specifying -Djava.class.version=49.0
in
Application servers > server1 > Process Definition > Java Virtual Machine
of WAS 6.0:
org.codehaus.xfire.annotations.AnnotationException: Class MyWebService does not have a WebService annotation
at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:287)
at org.codehaus.xfire.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:176)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
at org.codehaus.xfire.spring.XFireConfigLoader.getXFireApplicationContext(XFireConfigLoader.java:107)
at org.codehaus.xfire.spring.XFireConfigLoader.loadContext(XFireConfigLoader.java:41)
at org.codehaus.xfire.transport.http.XFireConfigurableServlet.loadConfig(XFireConfigurableServlet.java:86)
at org.codehaus.xfire.transport.http.XFireConfigurableServlet.createXFire(XFireConfigurableServlet.java:54)
at org.codehaus.xfire.transport.http.XFireServlet.init(XFireServlet.java:45)
I don't coding it w/ annotations would make any difference because retrotranslator would strip everything out anyway, but that's one of the things i might have to try.
No kidding: the service does indeed work w/ enums in 1.4.
Moreover, schema-to-java is not required for this. Java-to-schema works as well.
FYI for people in this situation: annotations apparently are required for the web service. Basically, it needs to be written as a Java-5-based web service before retrotranslation.
I first thought that retrotranslator just strips annotations away, but i think that's not the only thing it does: they do appear to make an effect on the final bytecode produced, and thus appear to be required.
I guess based on this, JAXB 1 support in xfire isn't really needed, as one can retrotranslate JAXB 2 to run under 1.4.
Client generation is only supported on Java 1.5. If you want support for 1.4 you'll have to use retrotranslator (google should help with instructions on how to use it).