Wiki source code of Changing the default messaging format to XML
Version 9.2 by Bouke Reitsma on 2023/03/03 13:13
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{container}}{{container layoutStyle="columns"}}((( | ||
2 | |||
3 | In our crash course on the API Gateway pattern, we have learned about setting up the API Gateway. By default, the messaging format chosen for your gateway is JSON. However, in some instances, other message formats are more appropriate as default. In this microlearning, we focus on changing the default message format and show the impact this has on flows in Create. | ||
4 | |||
5 | Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]]. | ||
6 | |||
7 | == 1. Prerequisites == | ||
8 | |||
9 | * Basic knowledge of the eMagiz platform | ||
10 | |||
11 | == 2. Key concepts == | ||
12 | |||
13 | There are no specific concepts to consider for now that require additional explanation. | ||
14 | |||
15 | == 3. Changing the default messaging format == | ||
16 | |||
17 | In our crash course on the API Gateway pattern, we have learned about setting up the API Gateway. By default, the messaging format selected for your gateway is JSON. However, the default messaging format can be changed in your project to for example, XML. This change can be made in Design -> Settings -> API Management. On the right side of this overview are the gateway settings. The last entry of this overview is the Default Format. By clicking on the Edit settings button, you enter the following overview | ||
18 | |||
19 | [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-changing-default-messaging-format--edit-settings.png]] | ||
20 | |||
21 | The last option allows you to switch between JSON or XML as your default messaging format in the gateway. In order to apply your new default to your project, you must press "Apply settings" in Design -> Architecture to confirm your change~*. | ||
22 | |||
23 | {{info}}~* Note Changing the default messaging format does not affect existing operations in Create. Migrating these flows requires a reset of the exit flow. Additionally, the default response in Catalog has to be changed to application/xml. | ||
24 | {{/info}} | ||
25 | |||
26 | == 4. Impact in Create == | ||
27 | |||
28 | The automatic flow creation in the Create phase is adapted to the new default setting. When changing the messaging format to XML, the components of newly generated flows are created with different names and settings. The image below shows an example of an API GET operation with XML as the default messaging format. Besides the changed naming of the transformation, no support objects are required for this GET operation, since your gateway does not require a JSON response any more. | ||
29 | |||
30 | [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-changing-default-messaging-format--get-operation.png]] | ||
31 | |||
32 | == 4. Assignment == | ||
33 | |||
34 | Change the default messaging format to XML. | ||
35 | This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. | ||
36 | |||
37 | == 5. Key takeaways == | ||
38 | |||
39 | * The default messaging format can be changed to XML | ||
40 | * Updating this only affects new flows | ||
41 | * Migrating existing operations can be done by resetting the exit flow | ||
42 | |||
43 | == 6. Suggested Additional Readings == | ||
44 | |||
45 | If you are interested in this topic and want more information on it please read the help text provided by eMagiz. | ||
46 | |||
47 | == 7. Silent demonstration video == | ||
48 | |||
49 | To be recorded. | ||
50 | |||
51 | )))((({{toc/}}))){{/container}}{{/container}} |