Giter VIP home page Giter VIP logo

Comments (6)

mySCHOTT avatar mySCHOTT commented on September 14, 2024

Just look at https://github.com/admin-shell/aasx-package-explorer/issues/31, how to use the Net46AasxServerPlugin.dll

Keep in mind, the implementation / function calls are not standardsized. It is just some ideas by the author of the AasxPackageExplorer!
###########################################
(1) Start REST:
AasxPackageExplorer_Build191121_REST_01

AasxPackageExplorer_Build191121_REST_02

(2) Start REST client such as POSTMAN:
AasxPackageExplorer_Build191121_REST_03

(3) REST log:
AasxPackageExplorer_Build191121_REST_Log.txt

(4) current REST api calls:

GET ^/aas/(id|([^/]+))(|/core|/complete|/thumbnail|/aasenv)(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetAasAndAsset
PUT ^/aas(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.PutAas
DELETE ^/aas/([^/]+)(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.DeleteAasAndAsset
GET ^/handles/identification(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetHandlesIdentification
POST ^/handles/identification(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.PostHandlesIdentification
GET ^/server/profile(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetServerProfile
GET ^/assets/([^/]+)(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetAssets
PUT ^/assets(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.PutAssets
GET ^/aas/(id|([^/]+))/submodels(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetSubmodels
PUT ^/aas/(id|([^/]+))/submodels(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.PutSubmodel
DELETE ^/aas/(id|([^/]+))/submodels/([^/]+)(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.DeleteSubmodel
GET ^/aas/(id|([^/]+))/submodels/([^/]+)(|/core|/deep|/complete)(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetSubmodelContents
GET ^/aas/(id|([^/]+))/submodels/([^/]+)/table(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetSubmodelContentsAsTable
GET ^/aas/(id|([^/]+))/submodels/([^/]+)/elements(/([^/]+)){1,99}?(|/core|/complete|/deep|/file|/blob|/events|/property)(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetSubmodelElementsContents
POST ^/aas/(id|([^/]+))/submodels/([^/]+)/elements(/([^/]+)){1,99}?/invoke(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.PostSubmodelElementsContents
PUT ^/aas/(id|([^/]+))/submodels/([^/]+)/elements(/([^/]+)){0,99}?(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.PutSubmodelElementsContents
DELETE ^/aas/(id|([^/]+))/submodels/([^/]+)/elements(/([^/]+)){0,99}?(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.DeleteSubmodelElementsContents
GET ^/aas/(id|([^/]+))/cds(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetCds
PUT ^/aas/(id|([^/]+))/cds(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.PutConceptDescription
GET ^/aas/(id|([^/]+))/cds/([^/]+)(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.GetSpecificCd
DELETE ^/aas/(id|([^/]+))/cds/([^/]+)(/|)$ > AasxRestServerLibrary.AasxRestServer+TestResource.DeleteSpecificCd

from aasx-package-explorer.

mySCHOTT avatar mySCHOTT commented on September 14, 2024

(1) POSTMAN
http://localhost:1111/handles/identification/

(2) aasx MessageLog:

TRC: Listening: http://localhost:1111/
WRN: Please notice: the API and REST routes implemented in this version of the source code are not specified and standardised by thespecification Details of the Administration Shell. The hereby stated approach is solely the opinion of its author(s).
INF: Routing Request  : a4c106d931b9 - GET /handles/identification/ has 1 routes
TRC: Route Invoked    : a4c106d931b9 - 1/1 AasxRestServerLibrary.AasxRestServer+TestResource.GetHandlesIdentification
TRC: Routing Complete : a4c106d931b9 - 1 of 1 routes invoked

(3) BUT in POSTMAN getting no response for the request?!?
AasxPackageExplorer_Build191121_REST_04

from aasx-package-explorer.

mySCHOTT avatar mySCHOTT commented on September 14, 2024

Using 02_Bosch.aasx in AasxPackageExplorer:

GET:
http://localhost:1111/aas/Bosch_NexoPistolGripNutrunner

RESPONSE:

{
    "AAS": {
        "hasDataSpecification": null,
        "derivedFrom": null,
        "asset": {
            "keys": [
                {
                    "type": "Asset",
                    "local": true,
                    "value": "http://dc-qr.com?m=0608842005&s=917004878",
                    "index": 0,
                    "idType": "URI"
                }
            ]
        },
        "submodels": [
            {
                "keys": [
                    {
                        "type": "Submodel",
                        "local": true,
                        "value": "http://boschrexroth.com/shells/0608842005/917004878/submodels/nameplate",
                        "index": 0,
                        "idType": "URI"
                    }
                ]
            },
            {
                "keys": [
                    {
                        "type": "Submodel",
                        "local": true,
                        "value": "http://boschrexroth.com/shells/0608842005/917004878/submodels/document",
                        "index": 0,
                        "idType": "URI"
                    }
                ]
            },
            {
                "keys": [
                    {
                        "type": "Submodel",
                        "local": true,
                        "value": "http://boschrexroth.com/shells/0608842005/917004878/submodels/service",
                        "index": 0,
                        "idType": "URI"
                    }
                ]
            },
            {
                "keys": [
                    {
                        "type": "Submodel",
                        "local": true,
                        "value": "http://boschrexroth.com/shells/0608842005/917004878/submodels/identification",
                        "index": 0,
                        "idType": "URI"
                    }
                ]
            }
        ],
        "conceptDictionaries": [],
        "identification": {
            "idType": "URI",
            "id": "http://boschrexroth.com/shells/0608842005/917004878"
        },
        "administration": null,
        "idShort": "Bosch_NexoPistolGripNutrunner",
        "category": null,
        "modelType": {
            "name": "AssetAdministrationShell"
        },
        "descriptions": null
    },
    "Asset": {
        "hasDataSpecification": null,
        "assetIdentificationModelRef": null,
        "identification": {
            "idType": "URI",
            "id": "http://dc-qr.com?m=0608842005&s=917004878"
        },
        "administration": null,
        "idShort": "M0608842005_S917004878",
        "category": null,
        "modelType": {
            "name": "Asset"
        },
        "kind": "Instance",
        "descriptions": null
    }
}

AasxPackageExplorer_Build191121_REST_05

from aasx-package-explorer.

qirchseu avatar qirchseu commented on September 14, 2024

Thanks for the help.
I have done as the guide. The communication between server and client in a same PC is working well.
2
But the communication between different PCs fails. Even though the localhost IP address, 127.0.0.1, was used. The http error 400 is listed.
7
I searched the error on the web. Someone suggested to modify the 'hosts' file. I modified the 'hosts', but the error still happens.

from aasx-package-explorer.

mySCHOTT avatar mySCHOTT commented on September 14, 2024

Please try to run the application with admin rights as following:
AasxPackageExplorer.exe -maximized -dll ..\AasxPlugInS\Net46AasxServerPlugin\Net46AasxServerPlugin.dll -resthost SDEMAIM101187 -restport 11112
AasxPackageExplorer_Build191121_REST_10
Then you could map the REST server to your computername.

Please verify, that none remote access is blocked like by firewall settings. The REST server will start as configured:
AasxPackageExplorer_Build191121_REST_11

No remote access from another computer tested, because currently in quarantine.
AasxPackageExplorer_Build191121_REST_12

from aasx-package-explorer.

mySCHOTT avatar mySCHOTT commented on September 14, 2024

If I understand well, they are using Grapevine as a REST server

Please find more information here:
https://github.com/sukona/Grapevine/wiki

from aasx-package-explorer.

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.