Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[basyx-dev] Operation invoke problem
  • From: "Laack, Markus van" <markus.van.laack@xxxxxxxxxxxxxxxxx>
  • Date: Mon, 7 Jun 2021 09:19:23 +0000
  • Accept-language: de-DE, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ieg.fraunhofer.de; dmarc=pass action=none header.from=ieg.fraunhofer.de; dkim=pass header.d=ieg.fraunhofer.de; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PO5WPXgeAwvwz86lU8PH6PF7OGoF2/2yjNw3HHJRJGA=; b=j/WIRCzgOFOS/VX3SqEctfaVgLvknnq0EpkoX6SR0j9EBggrMVIHCyCdjs1t5lxXntwS/1NI1hsEHC+LF4i1Bdw+FjuWK3B0Eju6pO5GHXFk5+U1ZiZw6idXfYRL6hEcAybxcT6KdZuDuUx0fHSLuJUAK8QAXOK5q1BOXl3TV4nXjcaajAPKCbwwt7mDQ+y9rvqgxdKjWU9dLsDlZDxG92551RDy78PRPCx+gDw9RarDNxatoyQzdwE2Xj+k8K1SoqUU8AsfeD8wrtILv6VE7ZAJ7itWygZ0JKOPauTExqgx9B6L77MMkcOnehdwYGIJO3kRE3vs04HQEingD9imeA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WwcZzayIUlcsy3YUCFlVP5o9jjy9AbyBqR5DvNtsoG6kaWtZlSl8mmFERpYNgrExanTp6J+DRBj++g6lNOZaLB05JZU/4dnPdg7+r8+0Sm8Jc/oaNNkUI958ZehFV+v3VuqaKk+Dh3BG1VIAkn97JWtmSFQlFrd+Nka9Qv50aG8hWjUF8UrMc/6vCwdpGDK+NYr7QhTpdZF7r2Opv+rIh7Qe6l+aftef/0V/iB/y9sZY4iR8/Euw7UFyuHrDL1sv37mlWnHpvVpNGyHMKceu3aLOHUbAPrzlcZDIdIlzOaGEqLgFUeL3GdomHfRa+H99FH9mf0bCXzth6K+3iMwYhQ==
  • Delivered-to: basyx-dev@xxxxxxxxxxx
  • Ironport-hdrordr: A9a23:pbfngqEX/3i5mRjepLqEgceALOsnbusQ8zAXPiFKJyC9HvbyqynMppsmPH3P5Qr5MUtI8exoU5PtfZqzz/RI3bU=
  • Ironport-phdr: A9a23:rcgDkhYKWp3TodqTrFyaRvf/LTDFhN3EVzX9orIqgLZPar+uuZP4Mx+X6fZsiQrPWoPWo7JBhvHNuq/tEWoH/d6asX8EfZANMn1NicgfkwE6RsLQD0r9Ia3nZCg7BN9PElh/8CLzPU1cAs2rYVrUrzW75iITHROqMw1zK4GXUo7fhsi6zaa84ZrWNgRFi3yze7pvKhWxowjL8MUb0uNf
  • Ironport-phdr: A9a23:eeb8UBBJJkIDjIarbF1rUyQVhBdPi9zP1kY955EjiqpVf+Kk5ZuxdEDc5PA4iljPUM2b7v9fkOPZvujmXnBI+peOtn0OMfkuHx8IgMkbhUosVciCD0CoIfXubjQhEYJFTlA2t32+OFJeTcD5YVCaq3au7DkUTxP4MwcQRKz1F4fegt7x2fq1/sjSbgoOiiC0fLVyKxu7t0Pdu5p+vA==
  • Ironport-sdr: T93Xb3D8xMw7OHTES/g1SLLCW4EpF1z7c1oJau5xoNezvAjYO2GiqdetDfdsaEdorRMMfnzTDv VFvWr9We/rzSt/nODLyU9QVun/WiV7kpD39MQRswV0ByyxZdFdQ2gsZF13SQPuB8zRD/+GV7PZ PFzoeQuExjZqe1IffO43R8yPSfv5UaosacVgx7EFmDd3ABAs4piG/sA6dobxyNHJgOJHQp34By 2KA+3DOw2xs4gLJwBZvecq/jsuO7cQ8hntbethuhlCxpNZELfV1xrtww3Oo5zRk73jWrpgh4n3 ylk=
  • Ironport-sdr: ocb2UsIo8svboXfiSQZtl65WP/XwN0i+d1qOUa765FRJ8PJ6E2wUYsFjRH1Rgm/KPKAxL/UzjD XkT/zmZUPnzNBx+TidPIdyBiMLLGg8uGe13I3uf9MwerYF8q9dZzYmnPfJv66Sq43yYNRvWCP6 H0KCn8YcejxOh/i7XhCqzM8pSxtUB85kNB2bFnsaqZ86YHv3okuhRChqneC9YZemqUjI9gSxup PLQxQtZClwBrcmfJEySs9zud6QSHzfks3oeUK0sQjMGwICBymHlSHe4nfdLskH1QwxRgzFEmlp CddQJJEY+WgHGI7ZNtvmT2F4
  • List-archive: <https://www.eclipse.org/mailman/private/basyx-dev/>
  • List-help: <mailto:basyx-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/basyx-dev>, <mailto:basyx-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/basyx-dev>, <mailto:basyx-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: Addbfi/wr8wA5AyKRSCITD8okVK5xw==
  • Thread-topic: Operation invoke problem

Dear BaSyx Developer,

 

I’m Markus van Laack working for the Fraunhofer IEG. We are planning to use BaSyx within our project and I’m currently doing my first steps and tests with it.

One requirement I am trying to get to work is to invoke a defined Operation. The goal for later will be to call a local Python script but for now I’m just trying to be able to invoke an Operation at all.

 

As a fist start I took the “Hello_World” example and added an Operation to the Server.java as it is explained in the Step 3 of the Introductory Examples.

I’ve extended the code of the Server.java by the following lines to create my Operation and to add it to the Documentation Submodel:

 

// Function to become Operation

Function<Object[], Object> runModel = (argus) -> {

System.out.println("Hello");

      return null;

};          

 

// Create Operation

Operation runModelOperation = new Operation(runModel);

// Set ID of the operation

runModelOperation.setIdShort(OPID);

// Add the operation to the Submodel

documentationSubmodel.addSubmodelElement(runModelOperation);

 

 

Inside the Client.java I’ve just added the following lines to the bottom to retrieve and to invoke the new Operation:

 

ISubmodel submdl = manager.retrieveSubmodel(Server.OVENAASID, Server.DOCUSMID);

IOperation runMdlOperation = submdl.getOperations().get(Server.OPID);

System.out.println(runMdlOperation.getIdShort()); // This line works and prints the ID short

runMdlOperation.invoke();// This line fails

 

 

But when executing the invoke I face the following error message:

 

Exception in thread "main" org.eclipse.basyx.vab.exception.provider.ProviderException: [HTTP POST] Failed to request http://localhost:4001/aasServer/shells/eclipse.basyx.aas.oven/aas/submodels/documentationSm/submodel with mediatype application/json;charset=UTF-8

 

In fact the line above is still working and printing out the ID short in the Console, so I assume that the Operation was successfully created and added to the Docu Submodel, but I don’t see why I cannot invoke it?!

 

I’m looking forward hearing from you.

Best regards and thank you for your time.

Markus van Laack


Back to the top