经过调查,因为build path 下面我只引用了axis2-1.6.2.jar.但是axis2在这里依赖于axiom-api,所以我后来通过maven的repository搜索了axiom.我把最新版的依赖加入,如下:
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>ws-commons</groupId>
<artifactId>axiom-api</artifactId>
<version>1.1.1</version>
</dependency>