axis2和现有项目集成
1.下载axis2-1.5-war.zip,解压后拷贝axis2/WEB-INF下面的conf和lib到现有项目的WEB-INF下,
(注意lib中的jar包不要和现有项目中得冲突)
2.在现有项目WEB-INF下创建目录\services\TestService\META-INF,在其中添加
MANIFEST.MF和services.xml,services.xml中配置有服务类名以及全路径
3.在现有项目中得web.xml中添加AxisServlet启动配置:
4.部署情况如下:
[img]http://dl.iteye.com/upload/attachment/534441/7a21093b-6bef-3997-92a5-9eaecfe80ac9.png[/img]
1.下载axis2-1.5-war.zip,解压后拷贝axis2/WEB-INF下面的conf和lib到现有项目的WEB-INF下,
(注意lib中的jar包不要和现有项目中得冲突)
2.在现有项目WEB-INF下创建目录\services\TestService\META-INF,在其中添加
MANIFEST.MF和services.xml,services.xml中配置有服务类名以及全路径
<?xml version="1.0" encoding="UTF-8"?>
<service name="TestService" scope="application">
<description>
传输对象
</description>
<parameter name="ServiceClass" locked="false">sample.ws.service.ServiceTest</parameter>
<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>
</service>
3.在现有项目中得web.xml中添加AxisServlet启动配置:
<servlet>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
4.部署情况如下:
[img]http://dl.iteye.com/upload/attachment/534441/7a21093b-6bef-3997-92a5-9eaecfe80ac9.png[/img]