Axis2 插件安装 如何在低版本eclipse使用axis2 1.6.1插件

来源:互联网 发布:linux管道命令返回值 编辑:程序博客网 时间:2024/04/27 23:58

在eclipse-jee-galileo-SR1-win32上装了半天都装不上,偶然发现通过非常规手段可以使用。


一.插件安装

Add 1.3 插件到plugins


Add 1.6插件到dropins

 

 

重启eclipse, 出现了2个,用第二个应该是1.6的

 

反向生成代码。

报错,缺少下图最上面2个包。

从AXIS2的LIB库中复制"geronimo-stax-api_1.0_spec-1.0.1.jar"和"backport-util-concurrent-3.1.jar"文件到Codegen的lib目录中,同时修改plugin.xml文件,添加
<library name="lib/geronimo-stax-api_1.0_spec-1.0.1.jar">
         <exportname="*"/>
</library>
<library name="lib/backport-util-concurrent-3.1.jar">
        <export name="*"/>
</library>

到plugin.xml文件中,保存。


成功后1.3生成出的代码。

1.6生成出的代码



public void downFile(StringfilePath) {            System.out.println(filePath);            StringtargetUrl = "http://localhost:8090/axis2/services/PipeService";            try {                  PipeServiceStubps = new PipeServiceStub(targetUrl);                  PipeServiceStub.SayHellosayHello = new PipeServiceStub.SayHello();                  PipeServiceStub.GetUsergetUser = new PipeServiceStub.GetUser();                                   sayHello.setName("sam");                  SayHelloResponse  shr = ps.sayHello(sayHello);                                   getUser.setUserName("sam");                                GetUserResponsegur = ps.getUser(getUser);                  Useru = gur.get_return();                                   System.out.println(shr.get_return());                  System.out.println(u.getName());                                        }catch (AxisFault e) {                                   e.printStackTrace();            }catch(RemoteException e) {                  // TODOAuto-generated catch block                  e.printStackTrace();            }


原创粉丝点击