Closed wasn93 closed 1 year ago
Thank you very much for this detailed description. Is is possible that the Submodel entry in the Registry is missing the "submodel" part? This error could propagate down to this retrieval. Due to legacy reasons, retrieving a Submodel works without the "submodel" part. The SubmodelElement retrieval, however, requires this part.
Is this still relevant? Otherwise, I will close the issue.
Sorry for the late response, I could check it now. Yes, this was the problem. Thanks for the assistance!
Frank Schnicke @.***> schrieb am Do., 25. Mai 2023, 11:34:
Is this still relevant? Otherwise, I will close the issue.
— Reply to this email directly, view it on GitHub https://github.com/eclipse-basyx/basyx-java-sdk/issues/285#issuecomment-1562505808, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6YTJ4WACLRB4UAHRG4DQYLXH4KSTANCNFSM6AAAAAAXVYL5QM . You are receiving this because you authored the thread.Message ID: @.***>
Perfect, happy to help!
While working with the sdk I figured out a problem (and probably the solution) in the ConnectedSubmodel class. I instantiate the class:
This works perfectly fine. As soon as I want to retrieve a submodel element via getSubmodelElement() (here the SubmodelElementCollection "Configurations") the following error is thrown:
The Submodel contains this element and it can be requested via direct approach in a browser. Doing some testing I could reproduce the error in the browser. The url to request a SubmodelElement is supposed to look like:
/shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements/{seIdShortPath}
Leaving out the "submodel"-part behind the {submodelIdShort} produces the error.
I checked the code of ConnectedSubmodel-class. The concrete function does:
The path to request is build here. Indeed it is only build from MultiSubmodelElementProvider.ELEMENTS, which equals to "submodelElements" and the idShort of the submodelElement. Due to the missing "submodel"-part it is not possible to request SubmodelElements with this function.
Additional: It seems like the error was already in version 1.3.1, as trying it out produces the same error. Here the code was: