我正在尝试将客户端应用程序从轴迁移到轴2。该应用程序还支持通过RMI的连接,因此我们使用存根和定位器文件抽象了连接。例如,我们做了以下操作:

AddFunctionLocator定位器= new AddFunctionLocator();

addfunction api =(addfunctionsoapbindingstub)locator.getAddFunction()

Api.Addint(5,3);

之所以如此,是因为定位器类将返回存根类,除了扩展org.apache.axis.client.stub外,还实现了AddFunction接口类。

但是,在AXIS 2中,使用WSDL2JAVA,我无法弄清楚是否可以使用此布置,因为定位器类都没有生成,也不会实现原始Addfunction接口类。 Does anyone have any advice on either the proper options to use with WSDL2Java or another way that I implement so I can keep this abstraction in our client code?

谢谢,

理查德

有帮助吗?

解决方案

不幸的是,Axis2不会为客户端存根生成接口。它可以为使用-s和-ssi开关的服务器做到这一点,因此您可以修改客户端以使用这些接口,尽管它不是那么直接。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top