修改部分xml文档,java类合并其他库中的接口
This commit is contained in:
@@ -34,11 +34,9 @@
|
||||
|
||||
|
||||
<full len="1" cn="填充类型">
|
||||
<text>0</text>
|
||||
</full>
|
||||
|
||||
<macLen len="1" cn="MAC 长度标识">
|
||||
<text>1</text>
|
||||
</macLen>
|
||||
|
||||
<key cn="密钥">
|
||||
|
||||
@@ -34,11 +34,9 @@
|
||||
</type>
|
||||
|
||||
<full len="1" cn="填充类型">
|
||||
<text>0</text>
|
||||
</full>
|
||||
|
||||
<macLen len="1" cn="MAC 长度标识">
|
||||
<text>1</text>
|
||||
</macLen>
|
||||
|
||||
<key cn="密钥">
|
||||
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<packet extend="base">
|
||||
<req>
|
||||
|
||||
<command>
|
||||
<bin>8008</bin>
|
||||
</command>
|
||||
<data extend="data">
|
||||
|
||||
<dataFlag len="1" cn="数据包标志">
|
||||
<options>
|
||||
<option cn="起始包">
|
||||
<bin>00</bin>
|
||||
</option>
|
||||
<option cn="中间包">
|
||||
<bin>01</bin>
|
||||
</option>
|
||||
<option cn="结束包">
|
||||
<bin>02</bin>
|
||||
</option>
|
||||
</options>
|
||||
</dataFlag>
|
||||
|
||||
<sqlite3 cn="Sqlite3 查询条件">
|
||||
若没有特别查询条件,则值为“ 1 = 1 ”
|
||||
</sqlite3>
|
||||
|
||||
</data>
|
||||
</req>
|
||||
<res>
|
||||
|
||||
<command>
|
||||
<bin>8009</bin>
|
||||
</command>
|
||||
<data>
|
||||
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
||||
<options>
|
||||
<option cn="无错误">
|
||||
<hex>00</hex>
|
||||
</option>
|
||||
<option cn="公钥不符合编码规则">
|
||||
<hex>04</hex>
|
||||
</option>
|
||||
<option cn="无效的加密标识">
|
||||
<hex>06</hex>
|
||||
</option>
|
||||
<option cn="无效的附加模式标识">
|
||||
<hex>07</hex>
|
||||
</option>
|
||||
<option cn="密钥奇偶校验错误">
|
||||
<hex>10</hex>
|
||||
</option>
|
||||
<option cn="LMK 错误">
|
||||
LMK 错误;报告给管理员。
|
||||
<hex>13</hex>
|
||||
</option>
|
||||
<option cn="输入数据错">
|
||||
<hex>15</hex>
|
||||
</option>
|
||||
<option cn="DSP 错误">
|
||||
DSP 错误;报告给管理员。
|
||||
<hex>47</hex>
|
||||
</option>
|
||||
<option cn="私钥错误">
|
||||
私钥错误;报告给管理员。
|
||||
<hex>49</hex>
|
||||
</option>
|
||||
<option cn="密钥块长度错误">
|
||||
<hex>76</hex>
|
||||
</option>
|
||||
<option cn="输入数据长度错误">
|
||||
<hex>80</hex>
|
||||
</option>
|
||||
</options>
|
||||
</error>
|
||||
|
||||
<dataFlag len="4" cn="数据包标志">
|
||||
0:起始包
|
||||
1:中间包
|
||||
2:结束包
|
||||
(可能hi因为字节对此,后三字节为垃圾值)
|
||||
</dataFlag>
|
||||
|
||||
<certAllNum len="4" cn="证书总数">
|
||||
主机字节序
|
||||
</certAllNum>
|
||||
|
||||
<realCertNum len="4" cn="实际证书个数">
|
||||
主机字节序
|
||||
</realCertNum>
|
||||
|
||||
<dataAttrFlag len="4" cn="数据包属性标志">
|
||||
0:固定长度包
|
||||
1:变长包,用@分隔
|
||||
目前默认为0,
|
||||
</dataAttrFlag>
|
||||
|
||||
<certLenMax len="4" cn="证书最大长度">
|
||||
目前固定128,若不够用,可用考虑改为256
|
||||
</certLenMax>
|
||||
|
||||
<certDN maxLen="1280" cn="证书DN">
|
||||
证书DN
|
||||
</certDN>
|
||||
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
</res>
|
||||
<script><![CDATA[
|
||||
function certDNLen() {
|
||||
return $final.getSection('data').getLen() - 22
|
||||
}
|
||||
]]> </script>
|
||||
</packet>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<packet extend="base">
|
||||
<req>
|
||||
|
||||
<command>
|
||||
<bin>8009</bin>
|
||||
</command>
|
||||
<data extend="data">
|
||||
|
||||
<certLen len="2" :value="certDataLen()" cn="公钥证书数据长度">
|
||||
</certLen>
|
||||
|
||||
<certData cn="公钥证书数据">
|
||||
</certData>
|
||||
|
||||
<organizationIdLen len="2" :value="organizationIdLen()" required="false" cn="机构号长度">
|
||||
机构号长度
|
||||
</organizationIdLen>
|
||||
|
||||
<organizationId required="false" cn="机构号">
|
||||
机构号,可选
|
||||
</organizationId>
|
||||
|
||||
</data>
|
||||
</req>
|
||||
<res>
|
||||
|
||||
<command>
|
||||
<bin>800A</bin>
|
||||
</command>
|
||||
<data>
|
||||
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
||||
<options>
|
||||
<option cn="无错误">
|
||||
<hex>00</hex>
|
||||
</option>
|
||||
<option cn="公钥不符合编码规则">
|
||||
<hex>04</hex>
|
||||
</option>
|
||||
<option cn="无效的加密标识">
|
||||
<hex>06</hex>
|
||||
</option>
|
||||
<option cn="无效的附加模式标识">
|
||||
<hex>07</hex>
|
||||
</option>
|
||||
<option cn="密钥奇偶校验错误">
|
||||
<hex>10</hex>
|
||||
</option>
|
||||
<option cn="LMK 错误">
|
||||
LMK 错误;报告给管理员。
|
||||
<hex>13</hex>
|
||||
</option>
|
||||
<option cn="输入数据错">
|
||||
<hex>15</hex>
|
||||
</option>
|
||||
<option cn="DSP 错误">
|
||||
DSP 错误;报告给管理员。
|
||||
<hex>47</hex>
|
||||
</option>
|
||||
<option cn="私钥错误">
|
||||
私钥错误;报告给管理员。
|
||||
<hex>49</hex>
|
||||
</option>
|
||||
<option cn="密钥块长度错误">
|
||||
<hex>76</hex>
|
||||
</option>
|
||||
<option cn="输入数据长度错误">
|
||||
<hex>80</hex>
|
||||
</option>
|
||||
</options>
|
||||
</error>
|
||||
</data>
|
||||
</res>
|
||||
<script><![CDATA[
|
||||
function certDataLen(){
|
||||
def len = $packet.data.certData.length;
|
||||
def data = new byte[2];
|
||||
data[0] = (byte)(len >> 8 & 0xFF)
|
||||
data[1] = (byte)(len & 0xFF)
|
||||
// data[0] = 0x04
|
||||
// data[1] = 0xB4
|
||||
return data;
|
||||
}
|
||||
|
||||
function organizationIdLen(){
|
||||
def organizationId = $packet.data.organizationId;
|
||||
if(null!=organizationId){
|
||||
def len = organizationId.length;
|
||||
def data = new byte[2];
|
||||
data[0] = (byte)(len >> 8 & 0xFF)
|
||||
data[1] = (byte)(len & 0xFF)
|
||||
return data;
|
||||
}
|
||||
}
|
||||
]]> </script>
|
||||
</packet>
|
||||
Reference in New Issue
Block a user