Comments (7)
Many thanks for providing your report. I tried to reproduce your issue with the AAS Server 1.0.2 Version but on my end it is working as expected.
Can you provide further details? Are you using our Docker Image on Docker Hub or are you starting the AAS Server differently?
Can you provide the specific rest calls, i.e., URL & payload, that you are doing?
from basyx-java-sdk.
It is aas-server image 1.0.2 from dockerhub
the calls:
PUT http://172.29.8.193:8082/aasServer/shells/sim%2Faas%2F1220_8141_0112_0875/aas/submodels/test_submodel
{"idShort": "test_submodel", "modelType": {"name": "Submodel"}, "identification": {"id": "Alarm", "idType": "IRI"}, "submodelElements": [{"idShort": "ExampleProperty2", "modelType": {"name": "Property"}, "value": "exampleValue2", "valueType": "string"}, {"idShort": "ExampleProperty", "modelType": {"name": "Property"}, "value": "exampleValue", "valueType": "string"}]}
GET http://172.29.8.193:8082/aasServer/shells/sim%2Faas%2F1220_8141_0112_0875/aas/submodels
{"identification": {"idType": "IRI", "id": "Alarm"}, "modelType": {"name": "Submodel"}, "idShort": "test_submodel", "submodelElements": {"ExampleProperty2": {"idShort": "ExampleProperty2", "valueType": "string", "modelType": {"name": "Property"}, "value": "exampleValue2"}, "ExampleProperty": {"idShort": "ExampleProperty", "valueType": "string", "modelType": {"name": "Property"}, "value": "exampleValue"}}}
Expected a SubmodelElement in Submodel[Identifier(IRI=Alarm)], but found 'ExampleProperty2'
Expected a SubmodelElement in Submodel[Identifier(IRI=Alarm)], but found 'ExampleProperty'
from basyx-java-sdk.
I still can't reproduce it. I'm doing the following:
docker run --name=aas -p 8081:4001 eclipsebasyx/aas-server:1.0.2
Create dummy AAS via
PUT http://localhost:8081/aasServer/shells/test
{ "hasDataSpecification": [], "asset": { "keys": [], "kind": "Instance", "identification": { "idType": "IRI", "id": "exampleAsset" }, "idShort": "exampleAssetIdShort" }, "submodels": [], "conceptDictionaries": [], "identification": { "idType": "IRI", "id": "test" }, "idShort": "HandsOnOven", "modelType": { "name": "AssetAdministrationShell" } }
Afterwards, I create your submodel using your JSON and
PUT http://localhost:8081/aasServer/shells/test/aas/submodels/test_submodel
Getting it via
http://localhost:8081/aasServer/shells/test/aas/submodels/test_submodel/submodel
returns exactly what I'm expecting
{ "identification": { "idType": "IRI", "id": "Alarm" }, "modelType": { "name": "Submodel" }, "idShort": "test_submodel", "submodelElements": [ { "idShort": "ExampleProperty2", "valueType": "string", "modelType": { "name": "Property" }, "value": "exampleValue2" }, { "idShort": "ExampleProperty", "valueType": "string", "modelType": { "name": "Property" }, "value": "exampleValue" } ] }
Are you doing anything differently?
from basyx-java-sdk.
After further internal discussion, we could reproduce this issue. It only happens when retrieving all Submodels of an AAS, i.e.
GET http://localhost:8081/aasServer/shells/test/aas/submodels/
We will address this issue in the first service release of the upcoming 1.1 release. The 1.1.1 release is projected to happen in April.
I will update this ticket when the bug is fixed. Many thanks again for pointing this out!
from basyx-java-sdk.
Note that a very similar issue appears on modelTypes of SubmodelElementCollection
.
from basyx-java-sdk.
Can you provide a json example of what exactly is going wrong?
from basyx-java-sdk.
Sorry, its the same as above: Instead of returning a list of elements, a dict
is returned with id_short
as key. Also only happens when requesting all submodels, not when requesting a specific submodel or submodel value.
from basyx-java-sdk.
Related Issues (20)
- date is missing as valueType
- Java SDK Setup not up-to-date HOT 6
- Trying to reproduce Basic Example (https://wiki.eclipse.org/BaSyx_/_Introductory_Examples) HOT 1
- Simple JWT architecture in the future? HOT 2
- 1.3.1 connect to running Registry throws MalformedRequestException (POST instead of PUT) HOT 3
- MetamodelConstructionException raised when using REST API to PUT to /shells/{aasId} HOT 2
- [Question] AASRegistryProxy: Registering a submodel that runs on another server HOT 2
- JsonProvider causes WrongNumberOfParametersException when Operation without parameters is invoked HOT 1
- SDK has redundant dependencies "javax.ws.rs:javax.ws.rs-api" vs. "jakarta.ws.rs:jakarta.ws.rs-api" HOT 2
- Basyx SDK should not depend on Apache Tika (tika-core) (only uses "mime" package) HOT 2
- Basyx SDK should not declare logback and janina as "compile" scope dependencies
- Consider "keycloak-admin-client" dependency to be optional, possibly "move" it to basyx.components? HOT 1
- Suggest to remove obsolete (?) package org.eclipse.basyx.vab.protocol.opcua.server and dependency to Milo "sdk-server" HOT 4
- AASXToMetamodelConverter.unzipFile() too verbose with INFO HOT 1
- Dependency org.apache.commons:commons-compress, leading to CVE problem
- Inconsistency with SubmodelElementCollection values format when returned from an Operation HOT 3
- ConnectedSubmodel.getSubmodelElement() building wrong path for http-request HOT 4
- Unable to access the AAS data HOT 6
- Cannot compile the project once the Tomcat 10.1 is installed [help wanted] HOT 1
- Qualifiable.getQualifiers() always returns an empty LinkedHashSet HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basyx-java-sdk.