原创作者: yangyang
阅读:14974次
评论:2条
更新时间:2011-05-26
axis可以随意部署在大部分web application server上,如:tomcat。它与你自己部署的应用几乎没有任何的耦合关系你只需要在你的web.xml中配置一下axis就可以正常使用了。这样我们能够很方便的将axis集成到我们自己开发的项目上。具体的配置如下:
xml 代码
- <listener>
- <listener-class>org.apache.axis.transport.http.AxisHTTPSessionListenerlistener-class>
- listener>
- <servlet>
- <servlet-name>AxisServletservlet-name>
- <display-name>Apache-Axis Servletdisplay-name>
- <servlet-class>
- org.apache.axis.transport.http.AxisServlet
- servlet-class>
- servlet>
- <servlet>
- <servlet-name>AdminServletservlet-name>
- <display-name>Axis Admin Servletdisplay-name>
- <servlet-class>
- org.apache.axis.transport.http.AdminServlet
- servlet-class>
- <load-on-startup>100load-on-startup>
- servlet>
- <servlet>
- <servlet-name>SOAPMonitorServiceservlet-name>
- <display-name>SOAPMonitorServicedisplay-name>
- <servlet-class>
- org.apache.axis.monitor.SOAPMonitorService
- servlet-class>
- <init-param>
- <param-name>SOAPMonitorPortparam-name>
- <param-value>5001param-value>
- init-param>
- <load-on-startup>100load-on-startup>
- servlet>
- <servlet-mapping>
- <servlet-name>AxisServletservlet-name>
- <url-pattern>/servlet/AxisServleturl-pattern>
- servlet-mapping>
- <servlet-mapping>
- <servlet-name>AxisServletservlet-name>
- <url-pattern>*.jwsurl-pattern>
- servlet-mapping>
- <servlet-mapping>
- <servlet-name>AxisServletservlet-name>
- <url-pattern>/services/*url-pattern>
- servlet-mapping>
- <servlet-mapping>
- <servlet-name>SOAPMonitorServiceservlet-name>
- <url-pattern>/SOAPMonitorurl-pattern>
- servlet-mapping>
- <session-config>
- <!-- Default to 5 minute session timeouts -->
- <session-timeout>5session-timeout>
- session-config>
- <mime-mapping>
- <extension>wsdlextension>
- <mime-type>text/xmlmime-type>
- mime-mapping>
- <mime-mapping>
- <extension>xsdextension>
- <mime-type>text/xmlmime-type>
- mime-mapping>
只要将上述的配置信息加入到你的web应用中就可以将Axis集成到你自己的项目中去了。还有一点需要说明,那就是除了这个配置以外还有将你的Axis.jar和其他必要的jar文件加入到你的WEB-INF/lib目录中,以及发布你的的webservice的classes到WEB-INF/classes/中。
2 楼 huigang10086 2012-08-03 10:09
1 楼 huigang10086 2012-08-03 10:09