Blog

Next steps with the AMLBaseX Client
Next steps with the AMLBaseX Client

AMLBaseX Rest client

I have spent quite a bit of time trying to figure out how to send an XQuery expression via http post request to the rest service of the BaseX database without errors. I had the problem that the XQuery expression could be processed without errors in the BaseX GUI application, but the same expression when submitted via HTTP request from the C# program was always incorrect. For the implementation I followed the RESTPost.Java example which presents the HTTP POST method as java code. In this example the content type for the post request is defined as “application/query+xml”. This corresponds to the following statement when using the .NET HttpClient in c#:

The AMLBaseX Client
The AMLBaseX Client

Client Server Architecture

For running the AMLBaseX plugin as a BaseX client application, the basexhttp.bat start script is used which starts the BaseX database server and the HTTP server for REST as a background process. The REST interface uses basic authorization (that’s why we had to sign in when we asked the browser to display http://localhost:8080/rest/) and without it the request will return an “unauthorized” error. Once the connection is established, http requests can be sent to the server via the REST interface. Results are returned as XML fragments.

Interactions between AMLEditor and AMLBaseX
Interactions between AMLEditor and AMLBaseX

XML Data Processing by AutomationML Editor

The AutomationML Editor uses the XML processor of the AutomationML Engine. The engine always loads the entire AutomationML document, mapped to a CAEX domain model. This behavior must be maintained.

Setting up the development environment for AMLBaseX
Setting up the development environment for AMLBaseX

Editing and Querying Large AutomationML Documents

AutomationML documents and collections exported from engineering systems can be far too large to visualize or edit in their raw form in the AutomationML Editor. This is where database technology comes into play. BaseX seems to be predestined for this. AutomationML documents should be able to be archived in a BaseX database and be directly visualizable and editable via a web interface in the AutomationML Editor. An editor plugin is to be developed for this purpose.

Welcome to this site!

I am in the process of learning how to use Jekyll to generate GitHub Pages. You can see my first attempts here. It really is very comfortable to be able to use predefined themes like the Bulma-clean theme created by C.S. Rhymes which I have used here.