使用 Web 服务时未找到 LocalTransportSender
我不太喜欢 Web 服务,但有时您必须遵守客户端界面。我已经从提供的 WSDL 成功生成了代码,但是当我尝试运行实际使用生成的类的应用程序时,我得到以下信息:
java.lang.ClassNotFoundException: org.apache.axis2.transport.local.LocalTransportSender
我将生成的代码保存在一个单独的项目中,并在我的 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>
如上所述,生成 jar 时没有任何问题,但是当它包含在使用它的应用程序中时,我得到了上述异常。
有什么想法吗?
I am not a big fan of web services, but sometimes you have to conform with a client interface. I have successfully generated code from the the provided WSDLs, but when I try and run the application which actually uses the generated classes, I get the following:
java.lang.ClassNotFoundException: org.apache.axis2.transport.local.LocalTransportSender
I am keeping the generated code in a separate project and have the following dependencies in my 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>
As stated, the jar gets generated without any issues, but when it is includes in the application that makes use of it, I get the said exception.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
添加以下依赖项可能应该可以解决这个问题。
Adding below dependency would probably should solve this problem.
使用下一个依赖项,您应该不会有任何问题
对于 api axis 2
对于运行时
Use next dependencies , and you should not have any problem
For api axis 2
For runtime