Axis2 配置指南(翻译) 关键字: Axis2 In Axis2, there are three kinds of configuration files to configure the system. The first one is to configure the whole system (global configuration), the second one is to configure a service (service configuration), and the third one is to configure a module (module configuration). This document explains the above configurations in detail. 在Aixs2 中,有三个文件可以用来配置系统。第一个配置整个系统(全局配置),第二个配置一个服务(服务配置),第三个配置一个模块(模块配置)。本文档详细介绍上面的配置。 内容 全局配置 (axis2.xml) 服务配置(services.xml) 模块配置 (module.xml) 全局配置 书写 axis2.xml 所有在启动 axis2 时需要的配置信息都从 axis2.xml 中取得。指明它们的方法非常简单和容易。此部分都是关于如何在axis2 中以合适的方式指定配置信息的,在配置文件中可以看到六个顶级元素,如下: Parameter Transport Receiver Transport Sender Phase Order Module References Listeners (Observers) Parameter:在Axis2 中,parameter(参数)就是一个名-值对,axis2.xml 中的每个顶级 parameter 元素将都被转换成 AxisConfiguration 中的属性,因此,配置文档中的顶级参数都可以在运行时环境中通过 AxisConfiguration 得到。下面是定义参数的正确的方法:
parameter value parameter> TransportReceiver:依赖于 Axis2 可能需要运行于其上的传输协议(Depending on the underlying transport on which Axis2 is going to run,),你需要不同的传输接收端。在系统中加入它们的方式如下: 6060parameter> 上面的元素说明了如何在axis2.xml 中定义传输接收端,这里,transportReceiver标 签 中的name属 性 标 识 指明 传 输 接 收 端 的 类 型 ,它 可以是 http,tcp,smtp,CommonsHTTP 等。 当 系 统 启 动 或 者 你 在 客 户 端设 置 传 输 器(transport)的时候,你可以使用这些传输名字(transpo...