# 中国电子口岸报文加签验证



统一加签接口: http://localhost:8080/rpc/eport/signature



## 1 311验证

入参:

![image-20220215180751937](https://alphahub-test-bucket.oss-cn-shanghai.aliyuncs.com/image/image-20220215180751937.png)

响应:

```json
{
  "message": "操作成功",
  "success": true,
  "timestamp": "2022-02-15 17:53:27",
  "code": 200,
  "data": {
    "success": true,
    "certNo": "01691f7f",
    "x509Certificate": "MIIE+zCCBGSgAwIBAgIEAWkffzANBgkqhkiG9w0BAQUFADB8MQswCQYDVQQGEwJjbjEVMBMGA1UECh4MTi1W/XU1W1BT41y4MRUwEwYDVQQLHgyLwU5me6F0Bk4tX8MxDTALBgNVBAgeBFMXTqwxITAfBgNVBAMeGE4tVv11NVtQThpSoYvBTmZ7oXQGTi1fwzENMAsGA1UEBx4EUxdOrDAeFw0yMTA1MzEwMDAwMDBaFw0zMTA1MzEwMDAwMDBaMB4xDzANBgNVBAMeBoSLWSdOOjELMAkGA1UEEh4CADEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMtI8VNQW/F/tP4KvX6I8qV1IkthY596m59Cy1nWcYdq2MkJ9x7F35VekgJxbVumHTNJSBbOZs1hGTeuKaTLl3+xMhLQ+YQ4kfvJUwcbCIdPTewqrCyJAq1UKTTHjxgudwUahb9IviSzDo0j4PJtCommbd84EO7SxNiLw6Rpg9QnAgMBAAGjggLmMIIC4jALBgNVHQ8EBAMCBsAwCQYDVR0TBAIwADCBpwYDVR0jBIGfMIGcgBT5daN4RQtCaMIEU6vrw04+VHh0YKGBgKR+MHwxCzAJBgNVBAYTAmNuMRUwEwYDVQQKHgxOLVb9dTVbUFPjXLgxFTATBgNVBAseDIvBTmZ7oXQGTi1fwzENMAsGA1UECB4EUxdOrDEhMB8GA1UEAx4YTi1W/XU1W1BOGlKhi8FOZnuhdAZOLV/DMQ0wCwYDVQQHHgRTF06sggEAMB0GA1UdDgQWBBT1YEuTpXfAwy4GwPYMasIvwDCwaDBCBgNVHSAEOzA5MDcGBiuBBw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ZyaLIU="
  }
}
```



自行生成用返回数据组装`xml`, 311推单,  `xml`预览:

![image-20220215181303331](https://alphahub-test-bucket.oss-cn-shanghai.aliyuncs.com/image/image-20220215181303331.png)



省略发请求直接看返回:

![image-20220215181519216](https://alphahub-test-bucket.oss-cn-shanghai.aliyuncs.com/image/image-20220215181519216.png)



查询验签是否通过:

![image-20220215181718468](https://alphahub-test-bucket.oss-cn-shanghai.aliyuncs.com/image/image-20220215181718468.png)

回执单查询: http://36.101.208.230:8090/ceb312msg?qryid=202202151758&dxpid=DXPENT0000458763

响应:

```json
[{org_id=1, instm=1644919105000, re_order_guid=CEB311_HNZB_FXJK_20220215175237_0013, returnstatus=2, ebpcode=46121601BC, returntime2=20220215175825, ebccode=46121601BC, trans_dxpid=DXPENT0000458763, returninfo=新增申报成功[CEB311_HNZB_FXJK_20220215175237_0014], returntime=1644919100000, orderno=20220215148803180891992064}]
```



## 2 621验证



http://localhost:8080/rpc/eport/signature



![image-20220215183948685](https://alphahub-test-bucket.oss-cn-shanghai.aliyuncs.com/image/image-20220215183948685.png)



```json
{
  "message": "操作成功",
  "success": true,
  "timestamp": "2022-02-15 19:14:41",
  "code": 200,
  "data": {
    "success": true,
    "certNo": "01691f7f",
    "x509Certificate": "MIIE+zCCBGSgAwIBAgIEAWkffzANBgkqhkiG9w0BAQUFADB8MQswCQYDVQQGEwJj\nbjEVMBMGA1UECh4MTi1W/XU1W1BT41y4MRUwEwYDVQQLHgyLwU5me6F0Bk4tX8Mx\nDTALBgNVBAgeBFMXTqwxITAfBgNVBAMeGE4tVv11NVtQThpSoYvBTmZ7oXQGTi1f\nwzENMAsGA1UEBx4EUxdOrDAeFw0yMTA1MzEwMDAwMDBaFw0zMTA1MzEwMDAwMDBa\nMB4xDzANBgNVBAMeBoSLWSdOOjELMAkGA1UEEh4CADEwgZ8wDQYJKoZIhvcNAQEB\nBQADgY0AMIGJAoGBAMtI8VNQW/F/tP4KvX6I8qV1IkthY596m59Cy1nWcYdq2MkJ\n9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CU1BNVRMVUE1MzASBgorBgEEAalDZAUMBAQWAjAwMBIGCisGAQQBqUNk\nAgQEBBYCMTQwEgYKKwYBBAGpQ2QCAQQEFgIxMDANBgkqhkiG9w0BAQUFAAOBgQA4\nw5rNt9NIi8S1vhNjMU/qH7IkX79X3B1wHwiuLvMZPnRPNY0xO0uDc2lme8RDHDxC\nk7RhUupgDbgQIiEwITWYaqNP499wkQ8EK88wLRCiuybcFGTl5MXyOIpfZtaDnRcU\nu2Edyt07vcIEWgtJmR6TTEBehCE14v+fIKuAcFDPTg==\n",
    "digestValue": "5nkQYKEtVilTfyWeWDr8Q+WuFNM=",
    "signatureValue": "mclW30swezmNfgpftA0j6cJz0qoqEaHyu9Q/TD1605k76mYsEzre2i3XdTiyWfXw8RLmVlvS/LTThc64iUIr8Dd5AZqaOBOeD8wHZ2AJ9B6emX9c3P7KfWXz4VF1k47TQg8MjGGpOS/zE+s2pIJWGa8y6ku7s3Rwro92mZ1INag="
  }
}
```





![image-20220215192458799](https://alphahub-test-bucket.oss-cn-shanghai.aliyuncs.com/image/image-20220215192458799.png)



直接看推推单结果

![image-20220215191938907](https://alphahub-test-bucket.oss-cn-shanghai.aliyuncs.com/image/image-20220215191938907.png)



回执查询响应



![image-20220215192525860](https://alphahub-test-bucket.oss-cn-shanghai.aliyuncs.com/image/image-20220215192525860.png)



## 3 海关179数据抓取验证



