Coder Social home page Coder Social logo

Comments (7)

FrankSchnicke avatar FrankSchnicke commented on August 15, 2024

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.

the-nic avatar the-nic commented on August 15, 2024

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.

FrankSchnicke avatar FrankSchnicke commented on August 15, 2024

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.

FrankSchnicke avatar FrankSchnicke commented on August 15, 2024

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.

the-nic avatar the-nic commented on August 15, 2024

Note that a very similar issue appears on modelTypes of SubmodelElementCollection.

from basyx-java-sdk.

FrankSchnicke avatar FrankSchnicke commented on August 15, 2024

Can you provide a json example of what exactly is going wrong?

from basyx-java-sdk.

the-nic avatar the-nic commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.