zoukankan      html  css  js  c++  java
  • Java webservice 将晦涩难懂的参数名修改为容易理解的名称

    Java webservice 接口方法默认的参数名让访问者摸不着头脑,如果需要修改参数名,需要在与接口类同包下建一个    接口类名.aegis.xml的文件  

    <?xml version="1.0" encoding="UTF-8"?>
    <mappings>
        <mapping>
            <method name="queryGetOrderInfo">
                <parameter index="0" mappedName="url"/>
                <parameter index="1" mappedName="dcity"/>
                <parameter index="2" mappedName="acity"/>
                <parameter index="3" mappedName="txtsfrq"/>
                <parameter index="4" mappedName="ddllx"/>
                <parameter index="5" mappedName="userid"/>
                <parameter index="6" mappedName="week"/>
                <parameter index="7" mappedName="zcjb"/>
                <parameter index="8" mappedName="pageIndex"/>
                <parameter index="9" mappedName="pagecount"/>
            </method>
            <method name="GDS_Login">
                <parameter index="0" mappedName="GDS_class"/>
                <parameter index="1" mappedName="GDS_serverIP"/>
                <parameter index="2" mappedName="GDS_connect_class"/>
                <parameter index="3" mappedName="GDS_port"/>
                <parameter index="4" mappedName="GDS_userIP"/>
                <parameter index="5" mappedName="GDS_username"/>
                <parameter index="6" mappedName="GDS_password"/>
            </method>
            <method name="GDS_State">
                <parameter index="0" mappedName="SID"/>
            </method>
            <method name="GDS_SendCmd">
                <parameter index="0" mappedName="cmd"/>
                <parameter index="1" mappedName="SID"/>
            </method>
            <method name="GDS_CmdRec">
                <parameter index="0" mappedName="SID"/>
            </method>
        </mapping>
    </mappings>

    method元素的name属性写接口里的方法名,parameter元素的index属性代表参数的位置,mappedName及修改后的名字。

  • 相关阅读:
    免密码远程登录和远程操作
    1、linux网络服务实验 用PuTTY连接Linux
    巧用CAS解决数据一致性问题
    第一天
    图像处理02
    图像处理01
    Poem 01(转)
    CS229 Lecture 01
    日本語1
    latex测试
  • 原文地址:https://www.cnblogs.com/dcxz/p/3729801.html
Copyright © 2011-2022 走看看