我是SOAP服务和轴的新手。我的要求是创建与jdk 5,6,7和8以及apache asix 1和2版本兼容的SOAP客户端。
我使用axis2和jdk 8版本创建了soap客户端,它工作正常。
现在我将Java版本更改为jdk
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)
我收到以下错误。
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Exception in thread "main"
我的pom.xml具有以下罐子
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rsa</groupId>
<artifactId>iek-aah-client</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.20</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-dom -->
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-dom</artifactId>
<version>1.2.20</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<version>1.2.20</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-jaxb -->
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-jaxb</artifactId>
<version>1.2.20</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-adb-codegen -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb-codegen</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-ant-plugin -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-ant-plugin</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-clustering -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-clustering</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-codegen -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-codegen</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-corba -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-corba</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-java2wsdl -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-java2wsdl</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxbri -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-jaxbri</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxws -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-jaxws</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-jibx -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-jibx</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-json -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-json</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-metadata -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-metadata</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-soapmonitor-servlet -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-soapmonitor-servlet</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-mtompolicy -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-mtompolicy</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-saaj -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-saaj</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-spring -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-spring</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-base -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-base</artifactId>
<version>1.7.8</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-fastinfoset -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-fastinfoset</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-mail -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-mail</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-tcp -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-tcp</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-udp -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-udp</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-xmpp -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-xmpp</artifactId>
<version>1.7.8</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-xmlbeans</artifactId>
<version>1.7.8</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.7.8</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<!-- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.12.17 </version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.codehaus.woodstox/stax2-api -->
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<version>3.1.1</version>
</dependency>
</dependencies>
</project>
请注意,我正在使用XMLBEANS生成客户端。 Tomcat版本为8.5
任何帮助将不胜感激。