WeBankBlockchain / WeIdentity-Rest-Service

RESTful HTTP Service for WeIdentity Integration
17 stars 18 forks source link

createEvidence API does not adapt to FISCO BCOS 3.3.0 #87

Closed ZPC2048 closed 1 year ago

ZPC2048 commented 1 year ago

FISCO BCOS: v3.3.0 weid-build-tools: 3.1.1-rc.1 java version: 1.11.0-openjdk-amd64

Postman request body

{
    "functionArg": {
        "id": "31c38f4c-4d12-40fd-92c4-4d9f1dce0135",
        "hash": "0x6726391a7fa259470c26a2e9c9467ddbb1f1e7108eeb6f279248b70bb91f8205",
        "proof": "3divzA7mgEv3774UtZRIxjUeQP0IEzMv/FfnRE6RgMjN1lMuyRJNvHF+N8NJjVydRmC9cWffKJjE30W8Vbk+MwA=",
        "log": "temp"
    },
    "transactionArg": {
        "groupId": "group0"
    },
    "v": "1.0.0",
    "functionName": "createEvidence"
}

Response body

{
    "respBody": null,
    "loopback": null,
    "errorCode": 201003,
    "errorMessage": "One or more input arguments format illegal. Please refer to the API documents. (Group ID illegal)"
}

I get some critical message in WeIdentity-Rest-Service/dist/logs/all.log and it is showed below. Full version has been upload here, start from line 3219.all.log

2023-06-27 14:32:32.079 [http-nio-6001-exec-4] INFO  ServiceLogAspect() - ####request url:http://127.0.0.1:6001/weid/api/invoke| type:POST| method:[HttpResponseData com.webank.weid.http.service.impl.TransactionServiceImpl.invokeFunction(String)]| args:[{
    "functionArg": {
        "id": "31c38f4c-4d12-40fd-92c4-4d9f1dce0135",
        "hash": "0x6726391a7fa259470c26a2e9c9467ddbb1f1e7108eeb6f279248b70bb91f8205",
        "proof": "3divzA7mgEv3774UtZRIxjUeQP0IEzMv/FfnRE6RgMjN1lMuyRJNvHF+N8NJjVydRmC9cWffKJjE30W8Vbk+MwA=",
        "log": "temp"
    },
    "transactionArg": {
        "groupId": "group0"
    },
    "v": "1.0.0",
    "functionName": "createEvidence"
}]
2023-06-27 14:32:32.079 [http-nio-6001-exec-4] INFO  InvokerEvidenceServiceImpl() - Cannot find groupId definition: {}
java.lang.NumberFormatException: For input string: "group0"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
    at java.lang.Intege
[all.log](https://github.com/WeBankBlockchain/WeIdentity-Rest-Service/files/11878452/all.log)
r.parseInt(Integer.java:652) ~[?:?]
    at java.lang.Integer.valueOf(Integer.java:983) ~[?:?]
    at ...

We thought it was because there exists a difference of definition of the groupId value between FISCO BCOS 2.x and 3.x.