Changes for page Validate Incoming Messages
Last modified by Erik Bakker on 2024/08/26 12:39
From version 36.1
edited by Erik Bakker
on 2022/06/12 09:36
on 2022/06/12 09:36
Change comment:
There is no comment for this version
To version 53.1
edited by Erik Bakker
on 2024/08/26 12:39
on 2024/08/26 12:39
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 -WebHome 1 +Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.WebHome - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,11 +1,8 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 - When settingupapointat which yourcustomers cantalkto you eMagizoffersvariousmethodsofcreatingsuchapoint.Oneofthoseoptionsisbyhostinga SOAPWebservicein eMagizthat handlesXMLmessagesasynchronously or synchronously.Inthismicrolearning,wewillzoomin onthepartthat validationofhemessages playswhen offeringsuch aSOAP web service.2 +In this microlearning, we'll dive into configuring validation for your SOAP web service. We'll focus on how to ensure that incoming XML messages meet your specified criteria using XSD for validation. Proper validation helps guarantee that the messages your service handles are both accurate and well-formed. By the end of this session, you'll understand how to set up and manage validation effectively within your SOAP web service configuration. 3 3 4 - Shouldyou have any questions,please contact academy@emagiz.com.4 +If you have any questions, don't hesitate to contact academy@emagiz.com. 5 5 6 -* Last update: June 10th, 2021 7 -* Required reading time: 7 minutes 8 - 9 9 == 1. Prerequisites == 10 10 * Basic knowledge of the eMagiz platform 11 11 ... ... @@ -12,7 +12,7 @@ 12 12 == 2. Key concepts == 13 13 This microlearning centers around configuring your SOAP web service. 14 14 15 -By configuring, we mean: Designing and determining the characteristics of the SOAP web service 12 +By configuring, we mean: Designing and determining the characteristics of the SOAP web service. 16 16 17 17 Crucial parts in the configuration are: 18 18 * Operation Name ... ... @@ -21,10 +21,10 @@ 21 21 * Authentication 22 22 23 23 Of these four points, we will zoom in on the validation part of our SOAP Webservice in this microlearning. 24 - 21 + 25 25 == 3. Validate Incoming Messages == 26 26 27 -When setting up a point at which your customers can talk to you eMagiz offers various methods of creating such a point. One of those options is byhostinga SOAP Webservice in eMagiz that handles XML messages asynchronously or synchronously. In this microlearning, we will zoom in on the part that validation of the messages plays when offering such a SOAP web service.24 +When setting up a point at which your customers can talk to you, eMagiz offers various methods of creating such a point. One of those options is to host a SOAP Webservice in eMagiz that handles XML messages asynchronously or synchronously. In this microlearning, we will zoom in on the part that validation of the messages plays when offering such a SOAP web service. 28 28 29 29 Crucial parts in the configuration are: 30 30 * Operation Name ... ... @@ -32,74 +32,26 @@ 32 32 * Validation 33 33 * Authentication 34 34 35 -Of these four points, we will zoom in on the validation part of our SOAP Webservice in this microlearning. The SOAP Webservice serves as a point of entry where people with the r ightscredentials (security) and the right answers (validation) areallowed to enter and perform their actions. In thenextmicrolearning, wewilltalk about thesecuritypart. In this microlearning, we talk about thevalidationpart.32 +Of these four points, we will zoom in on the validation part of our SOAP Webservice in this microlearning. The SOAP Webservice serves as a point of entry where people with the proper credentials (security) and the correct answers (validation) can enter and perform their actions. In the previous microlearning, we talked about the validation part. In this microlearning, we talk about the security part. 36 36 37 - Asyou have learned from the crash course you can validate an XML message with the help of an XSD.This XSD describes dataTypes,order, associations, and length ofattributes. You can use such an XSD forthe validation of what your clientssendyou. eMagiz will automatically define a WSDL based ontheXSD that you provide that storesmetainformation andstoresthe XSD for validation purposes.This way you can communicate the WSDL (location) toexternalparties as a referencedocument upon which they can build theirsolution. If you keep the eMagiz defaults you canaccess the WSDL via http://host:port/ws/ws-name/ws-name.wsdl. Note that you need to all values (except for the ws and .wsdl part) with actual values.34 +=== 3.1 Configuration on system message level in Design === 38 38 39 - WhateMagizdoesneed fromyou isthe correctXSD forvalidation.Asastartingpointyoushoulddownloadthe XSD that eMagizhasgeneratedbased on the system message(s)youhavedefinedin theDesignphase. Onceyouhavethatyoucantructure theXSD correctly.AvalidXSDstartwithaschemasegment.In thissegmentyouneedtodefineyourSOAPWSnamespace:36 +As you have learned from the crash course, you can validate an XML message with the help of an XSD. This XSD describes data types, order, associations, and length of attributes. You can use such an XSD to validate what your clients send you. eMagiz will automatically define a WSDL based on the combination of system messages you provide for each operation you want to host. To ensure that the WSDL is created correctly, don't forget to add an entity called "Send{givenname}Request" to the (request) system message and an entity called "Send{givenname}Response" in case you have a response system message. An example of how this needs to be configured in Design is shown below. 40 40 41 -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 42 -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 43 - xmlns="http://www.academy.emagiz.com/ns/mlacade-bus/spwbsrv-connector/1.0/" 44 - attributeFormDefault="unqualified" elementFormDefault="unqualified" 45 - targetNamespace="http://www.academy.emagiz.com/ns/mlacade-bus/spwbsrv-connector/1.0/"> 38 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages-gen3--root-entity-for-wsdl.png]] 46 46 47 - Onceyouhavethat you need tocopy all complex and simpletypesfrom the XSD that you downloaded and paste them below the linesyou have created:40 +=== 3.2 Effect in Create === 48 48 49 -<xs:complexType name="Input"> 50 - <xs:sequence> 51 - <xs:element name="String" type="nonEmptyString"/> 52 - <xs:element minOccurs="0" name="Decimal" type="xs:decimal"/> 53 - <xs:element name="Enum" type="Enum"/> 54 - <xs:element name="Integer" type="xs:long"/> 55 - <xs:element name="Boolean" type="xs:boolean"/> 56 - <xs:element minOccurs="0" name="DateTime" type="xs:dateTime"/> 57 - </xs:sequence> 58 - </xs:complexType> 59 - <xs:simpleType name="nonEmptyString"> 60 - <xs:restriction base="xs:string"> 61 - <xs:minLength value="1"/> 62 - </xs:restriction> 63 - </xs:simpleType> 64 - <xs:simpleType name="Enum"> 65 - <xs:restriction base="xs:string"> 66 - <xs:enumeration value="URGENT"/> 67 - <xs:enumeration value="HIGH"/> 68 - <xs:enumeration value="MEDIUM"/> 69 - <xs:enumeration value="LOW"/> 70 - <xs:enumeration value="PLANNING"/> 71 - </xs:restriction> 72 - </xs:simpleType> 42 +In the infra flow, eMagiz automatically adds a support object of the "Dynamic WSDL" type. In this support object, the link is made between the system message definitions and the WSDL that will be created based on this. 73 73 74 - To wrap thingsup youneed todefineyourRequestndResponselement andosetheschema:44 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages-gen3--dynamic-wsdl-support-object-infra.png]] 75 75 76 -<xs:element name="SendNptRequest"> 77 - <xs:complexType> 78 - <xs:sequence> 79 - <xs:element name="Input" type="Input"/> 80 - </xs:sequence> 81 - </xs:complexType> 82 - </xs:element> 83 - <xs:element name="SendNptResponse"> 84 - <xs:complexType/> 85 - </xs:element> 86 - </xs:schema> 46 +{{warning}}Note that when you make changes to the system message after the integration is already in Create, or when you add a new integration to Create, you need to create a new version of your infra flow to be able to deploy the changes to your WSDL.{{/warning}} 87 87 88 - Combiningthiswill result in a validXSD for my example. Inyour case, youwill need to enter other values. When you are done with the creation of the XSD saveit with a namesuch as spwbsrv-connector.xsd andupload it to the flow. Afteryouhave uploadedthe XSDlink ittothe connector-xsdsupportbjectinyour entry.48 +With this done, you have successfully added validation to your SOAP web service. 89 89 90 - [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages--uploaded-file.png]]50 +== 4. Key takeaways == 91 91 92 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages--file-linked-to-xsd-component.png]] 93 - 94 -With this done you have successfully added validation to your SOAP web service. 95 - 96 -== 4. Assignment == 97 - 98 -Add validation to the SOAP Webservice we have been configuring. 99 -This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. 100 - 101 -== 5. Key takeaways == 102 - 103 103 * Crucial parts in the configuration are: 104 104 ** Operation Name 105 105 ** SOAP Webservice Namespace ... ... @@ -107,14 +107,23 @@ 107 107 ** Authentication 108 108 * Validation is done with the help of an XSD 109 109 * The WSDL is used for external documentation 110 -* Use the XSD generated by eMagiz based on the system message as a starting point 59 +* eMagiz will automatically generate the WSDL for you based on your system messages 60 +** Do not forget to add the correct root entity to your system message to make the WSDL work 111 111 112 -== 6. Suggested Additional Readings ==62 +== 5. Suggested Additional Readings == 113 113 114 -If you are interested in this topic and want more information on it please read the help text provided by eMagiz. 64 +* [[Novice (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Novice.WebHome||target="blank"]] 65 +** [[SOAP Web service Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.WebHome||target="blank"]] 66 +*** [[Configure your SOAP web service (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-configure-your-soap-webservice-gen3.WebHome||target="blank"]] 67 +*** [[Securing your SOAP Webservice (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-securing-your-soap-webservice||target="blank"]] 68 +*** [[Endpoint Check (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-endpoint-check-gen3.WebHome||target="blank"]] 69 +*** [[SOAP Headers (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-soap-headers||target="blank"]] 70 +*** [[Calling a SOAP Web service (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-calling-a-soap-webservice||target="blank"]] 71 +*** [[Authorization - Calling a SOAP Webservice (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-authorization-calling-a-soap-webservice||target="blank"]] 72 +* [[Intermediate (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.WebHome||target="blank"]] 73 +** [[SOAP Web service Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.SOAP Web service Connectivity.WebHome||target="blank"]] 74 +* [[Expert (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Expert Level.WebHome||target="blank"]] 75 +** [[Webservice Security (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Expert Level.Webservice Security.WebHome||target="blank"]] 76 +* [[Validate (Search Result)>>url:https://docs.emagiz.com/bin/view/Main/Search?sort=score&sortOrder=desc&highlight=true&facet=true&r=1&f_space_facet=0%2FMain.&f_type=DOCUMENT&f_locale=en&f_locale=&f_locale=en&text=%22validate%22||target="blank"]] 115 115 116 -== 7. Silent demonstration video == 117 - 118 -{{video attachment="novice-soap-webservice-connectivity-validate-incoming-messages.mp4" reference="Main.Videos.Microlearning.WebHome"/}} 119 - 120 120 )))((({{toc/}}))){{/container}}{{/container}}