webService面向服务的架构配置信息

注册WSDD

project:目标对象 把server-config.wsdd生成到的位置

main:生成工具   org.apache.axis.client.AdminClient

-l http://localhost:8080/WebService/servlet/AxisServlet  deploy.wsdd

<!-- 创建描述部署文件
将deploy.wsdd发送到服务器上部署;生成 server-config.wsdd
 -->
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
	<handler name="track" type="java:cn.com.secn.webservice.coll.LogHandler">
		<parameter name="filename" value="MyService.log" />
	</handler>
	<!-- WebServer服务类 -->
	<service name="CollService" provider="java:RPC">
		<requestFlow>
		    <handler type="track" />
		</requestFlow>
		<!-- 异常处理 -->
		<parameter name="className" value="cn.itcast.axis.service.fault.FaultService" />
		<!-- 操作的className参数对应的类名 -->
		<parameter name="className" value="cn.com.secn.webservice.coll.CollService" />
		<!-- allowedMethods所能操作的方法;*为所有的方法,不能为private修饰符的 -->
		<parameter name="allowedMethods" value="*" />
 
	</service>
</deployment>
 

卸载WSDD

-l http://localhost:8080/WebService/servlet/AxisServlet   undeploy.wsdd

<undeployment xmlns="http://xml.apache.org/axis/wsdd/">
	<service name="HelloWorldService" />
	<service name="CollService" />
	<service name="webservice" />
</undeployment>
 

AXIS配置:

<?xml version="1.0" encoding="ISO-8859-1"?>  
  
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web  
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">  
  
<web-app>  
    <display-name>Apache-Axis</display-name>  
  
    <listener>  
        <listener-class>org.apache.axis.transport.http.AxisHTTPSessionListener</listener-class>  
    </listener>  
  
    <servlet>  
        <servlet-name>AxisServlet</servlet-name>  
        <display-name>Apache-Axis Servlet</display-name>  
        <servlet-class>  
            org.apache.axis.transport.http.AxisServlet  
    </servlet-class>  
    </servlet>  
  
    <servlet>  
        <servlet-name>AdminServlet</servlet-name>  
        <display-name>Axis Admin Servlet</display-name>  
        <servlet-class>  
            org.apache.axis.transport.http.AdminServlet  
    </servlet-class>  
        <load-on-startup>100</load-on-startup>  
    </servlet>  
  
    <servlet>  
        <servlet-name>SOAPMonitorService</servlet-name>  
        <display-name>SOAPMonitorService</display-name>  
        <servlet-class>  
            org.apache.axis.monitor.SOAPMonitorService  
    </servlet-class>  
        <init-param>  
            <param-name>SOAPMonitorPort</param-name>  
            <param-value>5001</param-value>  
        </init-param>  
        <load-on-startup>100</load-on-startup>  
    </servlet>  
  
    <servlet-mapping>  
        <servlet-name>AxisServlet</servlet-name>  
        <url-pattern>/servlet/AxisServlet</url-pattern>  
    </servlet-mapping>  
  
    <servlet-mapping>  
        <servlet-name>AxisServlet</servlet-name>  
        <url-pattern>*.jws</url-pattern>  
    </servlet-mapping>  
  
    <servlet-mapping>  
        <servlet-name>AxisServlet</servlet-name>  
        <url-pattern>/services/*</url-pattern> 
    </servlet-mapping> 
 
    <servlet-mapping> 
        <servlet-name>SOAPMonitorService</servlet-name> 
        <url-pattern>/SOAPMonitor</url-pattern> 
    </servlet-mapping> 
 
    <session-config> 
        <!-- Default to 5 minute session timeouts --> 
        <session-timeout>5</session-timeout> 
    </session-config> 
 
    <!-- currently the W3C havent settled on a media type for WSDL; http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft  
        for now we go with the basic 'it's XML' response --> 
    <mime-mapping> 
        <extension>wsdl</extension> 
        <mime-type>text/xml</mime-type> 
    </mime-mapping> 
 
 
    <mime-mapping> 
        <extension>xsd</extension> 
        <mime-type>text/xml</mime-type> 
    </mime-mapping> 
 
    <welcome-file-list id="WelcomeFileList"> 
        <welcome-file>index.jsp</welcome-file> 
        <welcome-file>index.html</welcome-file> 
        <welcome-file>index.jws</welcome-file> 
    </welcome-file-list> 
 
</web-app>
 

相关推荐