myeclipse8.5安装axis2 1.3

[1]下载Axis2_Codegen_Wizard_1.3.0  和 Axis2_Service_Archiver_1.3.0 

  将这2个文件夹复制到

D:\Program Files\Genuitec\Common\plugins

[2]修改文件

D:\Program Files\Genuitec\MyEclipse 8.5\configuration\org.eclipse.equinox.simpleconfigurator

添加下面2[2]:

Axis2_Codegen_Wizard,1.3.0,file:/D:/Program Files/Genuitec/Common/plugins/Axis2_Codegen_Wizard_1.3.0,4,false

Axis2_Service_Archiver,1.3.0,file:/D:/Program Files/Genuitec/Common/plugins/Axis2_Service_Archiver_1.3.0,4,false

[3]关于

   An error occurred while completing process-java.lang.reflect.InvocationTargetException 的错误

解决方法如下: 
step 1 、从 AXIS2 的 LIB 库中复制 "geronimo-stax-api_1.0_spec-1.0.1.jar" 和 

  "backport-util-concurrent-3.1.jar" 文件到 Axis2_Codegen_Wizard_1.3.0 的 lib 目录中 同时修改 Axis2_Codegen_Wizard_1.3.0 下的 plugin.xml 文件 在 <runtime> 中添加 

<library name="lib/geronimo-stax-api_1.0_spec-1.0.1.jar">  

         <export name="*"/>  

</library>  

<library name="lib/backport-util-concurrent-3.1.jar">  

        <export name="*"/> 

</library>  

到 plugin.xml 文件中 保存 !

//下面的这几步是原来有的但是测试后那个codegen竟然丢失了!!!!所以下面这几步不行

 

step 2 、将 $workspace 位置 \.metadata\.plugins 下目录 Axis2_Codegen_Wizard 删除

 

step 3 、在命令行下切换至 $ECLIPSE_HOME 目录,然后执行:

 

eclipse –clear

 

step 4 除了上面步骤还要:

    (4.1Axis2_Codegen_wizard_1.3.0(eclipse/plugins/Axis2_Codegen_wizard_1.3.0)的名字改成Axis2_Codegen_wizard_1.4.0

    (4.2plugin.xml中在<plugin>中 把Axis2_Codegen_wizardversion="1.3.0"改成version="1.4.0"

 

plugin.xml文件中,保存后重新启动Eclipse即可。

//实际就是什么都不做就ok;!!!!!!

这样以后就可以用codegen完成javawsdl的映射了!!!!!! 

:)

关于axis2  1.5 1.6 这个搞半天妹搞好!

关于怎么用参考另外一个网上下载的例子!

忘了说了:端口号是8080,最好修改一下免得跟tomcat冲突 conf文件夹下

===================================================

tuscany中实现web service构件

 

java.lang.NoSuchFieldError: deferredExpression

这个错误是jar报不兼容!去掉axis2的所有jar,只保留tuscany的包

<?xml version="1.0" encoding="GBK"?>

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" 

           targetNamespace="http://Hello"

           name="Hello">

     <service name="HelloService" promote="HelloServiceComponent">

        <binding.ws uri="http://localhost:8181/Hello" />

     </service>

    <component name="HelloServiceComponent">

        <implementation.java class="server.Hello"/>

    </component>

</composite>

 

==

RPCServiceClient serviceClient=new RPCServiceClient();

Options options=serviceClient.getOptions();

//设定服务提供者

EndpointReference targetEPR=new EndpointReference(

"http://localhost:8181/Hello");

options.setTo(targetEPR);

//设定所调用的服务操作

QName opGetHello=new QName("http://Hello","sayHello");

Class[] returnTypes=new Class[]{String.class};

//设定调用方法的参数值

Object[] opGetHelloArgs=new Object[]{"aviation"};

//得到调用的结果

Object[] response=serviceClient.invokeBlocking(opGetHello, opGetHelloArgs, returnTypes);

String result=(String)response[0];

================================

posted @ 2013-03-07 16:45  〆 冷情绪  阅读(561)  评论(0编辑  收藏  举报