AXIS2 环境搭建

1.获取axis2 的 war 包,解压
2.拷贝 META-INF,WEB-INF 到 对应目录
3.拷贝 classes 下 log4j.properties,commons-logging.properties 到classpath
4.在 services目录下创建 目录如下

services
    |
    project_name
       |
        META-INF
           |
            services.xml

services.xml 描述

<serviceGroup>
<service name="WeatherService" scope="application">
<description>
Weather POJO Service
</description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</messageReceivers>
<parameter name="ServiceClass">
sample.pojo.service.WeatherService
</parameter>
</service>
</serviceGroup>

访问wsdl

http://localhost:8080/project_name/services/WeatherService?wsdl

猜你喜欢

转载自inspire-xg.iteye.com/blog/2007200