Comments (4)
I checked the request that is being send by the UI. This is the payload for the example @wasn93 provided:
{
"inputArguments": [
{
"value": {
"modelType": "Property",
"valueType": "xs:int",
"idShort": "input",
"value": "2"
}
},
{
"value": {
"modelType": "Property",
"valueType": "xs:int",
"idShort": "input2",
"value": "2"
}
}
],
"inoutputArguments": [
{
"value": {
"modelType": "Property",
"valueType": "xs:int",
"idShort": "inAndOut",
"value": "2"
}
}
],
"clientTimeoutDuration": "PT60S"
}
The request looks good to me. It seems like this is an internal bug in the basyx-java-serversdk's code.
from basyx-java-server-sdk.
Thank you for raising this issue.
Are you invoking the operations using AAS-GUI? I think this could be more of an issue of how the client is generating the request; I quickly looked at the server code and I see no restriction based on the internal Operation SubmodelElement attribute (in/inout/out).
Also, could you please provide a minimal example?
from basyx-java-server-sdk.
Thank you for looking into it.
Yes, I am using the GUI. Further I am using the Operation Delegation Example. The only modification is, that I added a second operation in the operationDelegationAAS.json. It is a copy of the original one where I set the qualifier value to my endpoint and added a second inputVariable and one inoutputVariable. The model itself is displayed correctly in the GUI.
I've attached my JSON File. The server I set up for testing looks like this. It just prints the received content and gives a static response. To run it, the localhost has to replaced by the own IP in the server and in the qualifier in the JSON file.
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
serverPort = 8290
hostName = "localhost"
class OperationHttpServer(BaseHTTPRequestHandler):
protocol_version = "HTTP/1.1"
def do_POST(self):
content_length = int(self.headers["Content-Length"])
content_type = self.headers["Content-Type"]
if content_type == "application/json":
post_data = self.rfile.read(content_length)
print(post_data)
self._send_response(200, "I am the return value")
def _send_response(self, response_code: int, value):
response = [{"value": {"modelType": "Property", "value": value, "valueType": "xs:string", "idShort": "result"}}]
content = bytes(json.dumps(response), "utf-8")
self.send_response(response_code)
self.send_header("Content-type", "application/json")
self.send_header("Content-length", str(len(content)))
self.end_headers()
self.wfile.write(content)
if __name__ == "__main__":
webServer = HTTPServer((hostName, serverPort), OperationHttpServer)
print("Server started http://%s:%s" % (hostName, serverPort))
try:
webServer.serve_forever()
except KeyboardInterrupt:
pass
webServer.server_close()
print("Server stopped.")
from basyx-java-server-sdk.
Hi @aaronzi, thanks for checking the AAS GUI output.
@wasn93, thanks for providing additional info. We will take a look at the example and get back to you as soon we have an update on the issue.
from basyx-java-server-sdk.
Related Issues (20)
- No MQTT Events send when changing MLPs HOT 6
- No MQTT events for PUT-Requests? HOT 7
- Unable to retrieve list of AAS Identifiers from MongoDB in Discovery HOT 3
- cant connect my aasx file to the registry HOT 1
- Issue with Invokable Operation for File Input in Submodel HOT 6
- Microsoft Entra AD Support HOT 1
- Bug: basyx.aasenvironment+MongoDB stores binaries in Memory anyways (and by extension basyx.aassubmodelregitry as well i guess) HOT 3
- Issue : Unexpected Error 500 Occurred After using Blob input HOT 1
- Discovery service startup error when starting with MongoDB instead of InMemory HOT 2
- Invoking /shells?cursor=x returns 500 HOT 2
- Invoking /shells/$reference returns 400 HOT 2
- Problem with Adding DataBridge to Docker-Compose File HOT 5
- Submodel Repository returns empty embeddedDataSpecificatios for SubmodelElements HOT 1
- Dependency to license-tool-plugin:1.1.1-SNAPSHOT makes it hard to build out-of-the-box HOT 6
- move org.eclipse.digitaltwin.basyx.core.LoggingPropertySourceLoader to new artifact basyx.springcore - would help to reduce dependencies to basyx.core HOT 2
- SubmodelRepository Test Suite - AAS Instances non Conform HOT 1
- aas-discovery: Changing server.port in application.properties has no effect HOT 2
- [BUG] Serialization endpoint and createAASXAASEnvironmentSerialization mathods unable to download and include files HOT 3
- [BUG] Wrong HTTP-Statuscode On Thumbnail Upload HOT 1
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-server-sdk.