Changes for page Validation
Last modified by Danniar Firdausy on 2024/09/19 08:56
From version 23.1
edited by eMagiz
on 2022/06/10 12:28
on 2022/06/10 12:28
Change comment:
There is no comment for this version
To version 27.7
edited by Danniar Firdausy
on 2024/09/19 08:56
on 2024/09/19 08:56
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. eMagiz1 +XWiki.dfirdausy - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,13 +1,8 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 - =Validation=2 +In the previous microlearning session, we covered how to configure a REST service. Now, we will focus on validating the data structure of incoming messages to ensure they meet the required format. This includes how to handle errors when validation fails and how to notify the client about these issues. By the end of this microlearning, you’ll understand how to implement validation for REST endpoints effectively 3 3 4 -In the previous microlearning, we learned how to configure a REST service. In this microlearning, we will discuss how you can validate whether the party calling your REST endpoint is sending the correct information in terms of the structure of the message. We will also learn how you can subsequently report back to the client that a validation error occurred. 5 - 6 6 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 7 7 8 -* Last update: September 8th, 2021 9 -* Required reading time: 5 minutes 10 - 11 11 == 1. Prerequisites == 12 12 13 13 * Intermediate knowledge of the eMagiz platform ... ... @@ -15,15 +15,12 @@ 15 15 == 2. Key concepts == 16 16 17 17 This microlearning centers around validating incoming messages when hosting a REST web service. 18 -With REST, we mean: A web service that adheres to the RESTful principles 19 -With validation, we mean: Verifying whether the data structure we received is valid according to our definition 20 - 13 +* With REST, we mean: A web service that adheres to the RESTful principles. 14 +* With validation, we mean: Verifying whether the data structure we received is valid according to our definition. 21 21 * The external application pushes data to a REST web service (or API) hosted by eMagiz 22 -* When doing so, the external application should adhere to the defined data structure 23 -* If not, we need to refuse the call and respond with an error message 16 +** When doing so, the external application should adhere to the defined data structure 17 +** If not, we need to refuse the call and respond with an error message 24 24 25 - 26 - 27 27 == 3. Validation == 28 28 29 29 In the previous microlearning, we learned how to configure a REST service. In this microlearning, we will discuss how you can validate whether the party calling your REST endpoint is sending the correct information in terms of the structure of the message. We will also learn how you can subsequently report back to the client that a validation error occurred. ... ... @@ -44,30 +44,23 @@ 44 44 45 45 if (exists(//err:xml-validation-exception)) then 'validation' else if (exists(//err:exception[@class='org.springframework.integration.MessageTimeoutException'])) then 'timeout' else '' 46 46 39 +== 4. Key takeaways == 47 47 41 +* External applications must follow the defined data structure when sending information to a REST web service (or API) hosted by eMagiz. 42 +* If the incoming data does not meet the required structure, the request should be rejected, and an appropriate error message should be sent back to the client. 43 +* eMagiz automatically handles much of the validation process when using the API Gateway, simplifying error management and reporting. 44 +* For messaging flows, additional configuration is needed to replicate the same validation and error-handling functionality. 48 48 49 -== 4.Assignment==46 +== 5. Suggested Additional Readings == 50 50 51 -Navigate to a flow within your (Academy) project in which you host a REST Webservice. 52 -Ensure that when a validation error is thrown, eMagiz will return a proper response to the client. 53 -This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. 48 +If you are interested in this topic and want more information on it please read the help text provided by eMagiz when executing these actions and read the following links: 54 54 55 -== 5. Key takeaways == 50 +* [[Crash Courses (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.WebHome||target="blank"]] 51 +** [[Crash Course Messaging (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Messaging.WebHome||target="blank"]] 52 +*** [[Filter (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Messaging.crashcourse-messaging-filter||target="blank"]] 53 +* [[Intermediate Level (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.WebHome||target="blank"]] 54 +** [[REST Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.REST Connectivity.WebHome||target="blank"]] 55 +*** [[Configuration REST web service (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.REST Connectivity.intermediate-rest-webservice-connectivity-configuration-gen3.WebHome||target="blank"]] 56 +* [[Host REST web service (Search Results)>>url:https://docs.emagiz.com/bin/view/Main/Search?sort=score&sortOrder=desc&highlight=true&facet=true&r=1&f_space_facet=0%2FMain.&l_space_facet=10&f_type=DOCUMENT&f_locale=en&f_locale=&f_locale=en&text=%22host+REST+web+service%22||target="blank"]] 56 56 57 -* The external application pushes data to a REST web service (or API) hosted by eMagiz 58 -* When doing so, the external application should adhere to the defined data structure 59 -* If not, we need to refuse the call and respond with an error message 60 -* eMagiz auto generates a lot when using the API Gateway 61 -* You need to recreate this when using the same functionality in a messaging flow 62 - 63 - 64 - 65 -== 6. Suggested Additional Readings == 66 - 67 -If you are interested in this topic and want more information, please read the help text provided by eMagiz. 68 - 69 -== 7. Silent demonstration video == 70 - 71 -Please check out the store for a working example for a messaging solution. 72 - 73 73 )))((({{toc/}}))){{/container}}{{/container}}