Skip to content

Added "BaSyx Hello World" Java example#1029

Open
Shiraiku wants to merge 3 commits into
eclipse-basyx:mainfrom
Shiraiku:main
Open

Added "BaSyx Hello World" Java example#1029
Shiraiku wants to merge 3 commits into
eclipse-basyx:mainfrom
Shiraiku:main

Conversation

@Shiraiku

@Shiraiku Shiraiku commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Pull Request Template

Description of Changes

Added "BaSyx Hello World" Java example code with README.md Wiki page and POM.xml

@aaronzi aaronzi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the example. Please have a look at my remarks below.

Comment on lines +31 to +62
<dependencies>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasenvironment-client</artifactId>
<version>2.0.0-milestone-04</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasrepository-client</artifactId>
<version>2.0.0-milestone-08</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-client</artifactId>
<version>2.0.0-milestone-08</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasservice-client</artifactId>
<version>2.0.0-milestone-08</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-client</artifactId>
<version>2.0.0-milestone-08</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.aas4j</groupId>
<artifactId>aas4j-dataformat-aasx</artifactId>
<version>2.0.1</version>
</dependency>
</dependencies>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for using old milestones here and even different ones?

</dependency>
</dependencies>

</project> No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing empty last line


In this tutorial you will learn how to:

1. Connect to a BaSyx environment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Connect to a BaSyx environment
1. Connect to a BaSyx AAS Environment

4. Add Submodel Elements
5. Create Operations
6. Update and read data
7. Delete elements

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
7. Delete elements
7. Delete Submodel Elements

Comment on lines +20 to +36
>Create AAS
>↓
>Create Submodel
>↓
>Add Elements
>↓
>Add Operations
>↓
>Interact / Update
>↓
>Invoke Operations
>↓
>Delete Elements
>↓
>Delete Submodel
>↓
>Delete AAS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use a mermaid chart for this?

Comment on lines +43 to +44
- AAS Repository
- Submodel Repository

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the beginning you say an AAS Environment is used

Comment on lines +45 to +46
- AAS Registry
- Submodel Registry

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intro never says AAS and Submodel Registration is also part of this example

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file includes a few places with multiple consecutive empty lines. Please remove those

Comment on lines +70 to +86
## Step 2 – Configure BaSyx Environment

Configure BaSyx by editing the file:

`basyx/aas-env.properties`

Use the following configuration:

```properties
server.port=8081
basyx.backend=InMemory
basyx.environment=file:aas
basyx.cors.allowed-origins=*
basyx.cors.allowed-methods=GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
spring.servlet.multipart.max-file-size=500MB
spring.servlet.multipart.max-request-size=500MB
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that meant for the server-side config? Why change that if it already defines those?

Comment on lines +104 to +137
```xml
<dependencies>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasenvironment-client</artifactId>
<version>2.0.0-milestone-04</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasrepository-client</artifactId>
<version>2.0.0-milestone-08</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-client</artifactId>
<version>2.0.0-milestone-08</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasservice-client</artifactId>
<version>2.0.0-milestone-08</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-client</artifactId>
<version>2.0.0-milestone-08</version>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.aas4j</groupId>
<artifactId>aas4j-dataformat-aasx</artifactId>
<version>2.0.1</version>
</dependency>
</dependencies>
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See same comment as in the pom.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants