Open inowshin19 opened 3 months ago
Thank you for submitting this issue. We will look into it and get back to you with a solution.
Hi @inowshin19 , the invokable operation is developed by the Basyx SDK, it is not included in the AAS4j or AAS standard, so you cannot create an invokable operation using a Json file. Here is an example to create an invokable operation
From your provided information I understand that you want to upload an AAS defined in the opc2aasServiceAAS.json.
The best way to upload an AAS ist to use the follow HTTP REST API:
POST {server-url}/shells
body: serialized AAS as Json
see here
Hello @zhangzai123, thank you for the clarification!
Hi @inowshin19, I have tested your settings in a Junit test. The test runs through without error. It may because of the usage of the Postman that you got the 415 error.
I also came cross a problem regarding invokable operation. I create a submodel using createSubmodelWithAllSubmodelElements and create the submodel in SubmodelRepository with the createSubmodel method. After this I got error when I execute the operation, no matter via web-ui (got 405 Error) or via invoke
API (got NotInvokableException
).
However, if i create the submodel via the SubmodelRepository instance which returned from appContext.getBean(SubmodelRepository.class)
, it works indeed.
Hi @inowshin19 , the invokable operation is developed by the Basyx SDK, it is not included in the AAS4j or AAS standard, so you cannot create an invokable operation using a Json file.
Is it now possible to create a submodel in submodelrepository component which supports invokable operation directly, rather than through operation delegation? Please let me know if I'm missing something. Much appreciated!
Hi @gongzhq136,
invoking operations directly without the operation delegation feature is currently not supported.
I'll add your suggestion to the backlog for future consideration 👍
I am trying to use an invokable operation for file input in my Submodel using Postman. My Submodel and its element is defined as follows:
I am sending a POST request via Postman to the endpoint:
http://localhost:8081/submodels/VGVzdE9yY2hlc3RyYXRvcg/submodel-elements/AASUpload/invoke?async=false
The form-data and response is given below:
Is file not supported for input? Please let me know if I am doing something wrong.
Thank you very much in advance!