The examples are for the generic end point eo-form in
It demonstrates the communication from your browser as client to the server.
One can send any json getting the json as a response.
As a result one receive a json with some additional special fields from elastic objects:
- _rootmodel: Set the model of the root
- _logLevel: Default logLevel to fill log information
- _calls: List of calls found in Json
For elastic objects there this is an empty map object.
Those "informational" fields without object mapping are defined static in
The generic webserver interface
- object mapping,
- functional meaning
- or error handling.
The method eoPostForm just has a JSON string message as input. With this message this method creates a new EO object.
Any type information within this JSON message is used by
One advantage is that one can write tests without starting any application server thing. Further more the client is free to define any structure he needs.
One send a serialized object and receive "the same" serialized but enriched object. Thats all.
One can change the _logLevel to receive some more information.
One get then some feedback from the server in the logs list.
One can change the serialization type to json to return plan json without eo extensions. Default value for _serializationType is "EO".
The following example will return an empty json object due to _serializationType "STANDARD".
Mapping To Objects
A mapping will be defined by keys defined in the ≡Model Configurations.
Generally the model keys will be prepended to the field key except the root models.
The _rootModels entry refers to the type, the root is set.
The mapping for any sub field could be defined by a java casting type expression:
Standard json will be mapped straightforward:
All models that implements the
The implementation could be rather trivial as in the example with
The following example will read the value from source and set the target value with the computed sinus.
A special call is
At the bottom of each page you fid a post version sending the json via browser. Without the asTemplate parameter the json will be returned. Of course it's readable.