首页 >数据库 >mysql教程 >axis2 module建立的过程

axis2 module建立的过程

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-07 15:00:551205浏览

module的建立网上的例子都是参考axis21.4的,而且都是基于axis2的示例整合,在这里使用maven整合axis2的module。 上一次配置soapmonitor的时候将axis1.6jar包下的axis2.xml拷贝到web-inf目录下后,soap才起作用,我们这一次建立module则需要在axis2.xml中 在

module的建立网上的例子都是参考axis21.4的,而且都是基于axis2的示例整合,在这里使用maven整合axis2的module。

上一次配置soapmonitor的时候将axis1.6jar包下的axis2.xml拷贝到web-inf目录下后,soap才起作用,我们这一次建立module则需要在axis2.xml中

在axis2.xml中添加

<phase name="logTestPhase"></phase>
在resource的目录的meta-inf的目录下添加module.xml文件,内容如下,
<module name="logmonitor" class="com.hfmx.axis2.LogModule">
    <inflow>
        <handler name="InFlowTestLogHandler" class="com.LogHandler">
            <order phase="logPhase"></order>
        </handler>
    </inflow>

    <outflow>
        <handler name="OutFlowOurTestLogHandler" class="com.LogHandler">
            <order phase="logPhase"></order>
        </handler>
    </outflow>

    <outfaultflow>
        <handler name="FaultOutFlowTestLogHandler" class="com.LogHandler">
            <order phase="logPhase"></order>
        </handler>
    </outfaultflow>

    <infaultflow>
        <handler name="FaultInFlowTestLogHandler" class="com.LogHandler">
            <order phase="logPhase"></order>
        </handler>
    </infaultflow>
</module>


然后在axis2的services.xml添加如下代码
<module ref="logmonitor"></module>

com.LogHandler代码可以参照soapmonitarHandler的代码编写

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn