Analyze OData scheme
OData is an HTTP-based protocol (and thus platform-independent) that allows access to data services. There is a query language available directly via the URL that allows you arbitrary specific querying of existing data resources. In addition, data can also be written and deleted. Basically, OData is a kind of SQL for the web. For details, please visit http://www.odata.org/. You will find numerous tutorials there.
OData also provides metadata (XML schema files) that describes the structure of these data services. This plugin allows you to read out an OData schema file and create a source or target structure.
Directly uploading the schema file
(1) Load $metadata file: Here you can directly upload the EDMX file ( Entity Data Model XML ) "$metadata" if you have one. Alternatively, you can specify a URL under which it is available (see next section). Important note: Files are expected in version 4. Here is an example file: $metadata.
(2) Select entity: Here you can select one of the entities in the schema file from a list.
(3) Select inline entities: Optionally, you can additionally select existing references in the respective entity. However, only one level down is read out.
(4) Create structure for: Select whether you need a source or target structure and press the button to save it to the clipboard. Then open your profile and paste the structure via the context menu.
Loading schema file "$metadata" via URL
To explain how to get the "$metadata" file via a URL, we would like to refer to the example services on the official OData page https://services.odata.org/.
Choose the read-only service: https://services.odata.org/V3/OData/OData.svc/.
Now add the suffix "$metadata" to this URL and you will receive the desired EDMX file. However, you will get a version 1 file here (see first line at the end), but we need version 4. Therefore, please change the URL to "https://services.odata.org/V4/OData/OData.svc/$metadata".
You can now enter this URL in the GUI.
(5) Channel field: Here you can select a channel of type "HTTP".
(6) Certificate selection: If (7) is an HTTPS URL, you can optionally assign a client certificate. To do this, you select one of the local certificates.
(7) URL: The URL to the file.
(8) Adjust HTTP headers: If you click this button, another dialogue opens, in which you can enter additional HTTP request headers. You can use variables for the header names and the values. Syntax: @<Variable name>@.
(9) Via DMZ: If set, the DMZ server (if available) will be used for sending the request instead of the internal Integration Server.
(10) Ask for $metadata: Press this button to read the file via the URL. The rest works like in the first case.
Reading data
In order to query data via OData for the generated source structure, use the following query URL:
https://services.odata.org/V4/OData/OData.svc/Suppliers
Try it in a normal browser. The result is data in the JSON format.
Here is a simple example profile: Profile-OData_example.pak
Inserting, updating and deleting data
To insert or update data, you would send a JSON file to an OData service (a URL statement is sufficient for deleting). So you would analogously create a target structure in a profile with the metadata file and create a JSON file with the JsonCreationUnit, for example, which you would then send to the OData service in a Response "HTTP". This will only be hinted here this far, but the principle should be clear. Details on inserting, updating and deleting data can be found at "http://www.odata.org".
Note: Depending on whether you read, insert, update or delete, a different HTTP method (GET, POST, PATCH, DELETE) is necessary. In the profile above, for example, "GET" is used. See "https://www.odata.org/getting-started/basic-tutorial/".
Note: When reading, writing, updating and deleting, we always act as a client. We do not provide an OData service as a server.