使用Web服务时找不到LocalTransportSender

Jac*_*erk 2 java web-services

我不是Web服务的忠实粉丝,但有时您必须遵循客户端界面.我已经成功地从提供的WSDL生成代码,但是当我尝试运行实际使用生成的类的应用程序时,我得到以下内容:

java.lang.ClassNotFoundException: org.apache.axis2.transport.local.LocalTransportSender
Run Code Online (Sandbox Code Playgroud)

我将生成的代码保存在一个单独的项目中,并在我的pom中具有以下依赖项:

<dependencies>
  <dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-adb</artifactId>
    <version>1.6.1</version>
    <scope>compile</scope>
  </dependency>
  <dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-kernel</artifactId>
    <version>1.6.1</version>
    <scope>compile</scope>
  </dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)

如上所述,jar生成没有任何问题,但当它在应用程序中包含使用它时,我得到了所述异常.

有任何想法吗?

小智 15

添加下面的依赖可能应该解决这个问题.

<dependency>
  <groupId>org.apache.axis2</groupId>
  <artifactId>axis2-transport-local</artifactId>
  <version>1.6.2</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)