Changes for page Endpoint Check
Last modified by Erik Bakker on 2024/02/21 21:35
From version 27.2
edited by Erik Bakker
on 2022/06/10 13:08
on 2022/06/10 13:08
Change comment:
Update document after refactoring.
To version 36.2
edited by Erik Bakker
on 2022/06/12 09:36
on 2022/06/12 09:36
Change comment:
Update document after refactoring.
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -novice- file-based-connectivity-header-line1 +novice-soap-webservice-connectivity-soap-headers - Content
-
... ... @@ -1,77 +1,120 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 - In thismicrolearning,wewillfocusn usingannotationstoclarifyyourthoughtprocess.In theannotation,youeither describeabest practiceeveryoneshould follow when they changethatflow (i.e.withinthe asynchronousrouting),describehowthe(morecomplex) partsof theflowworkordescribe(partsof) of your messagedefinitions(i.e. CDM, API Gateway Data model,systemmessage, etc.). Thiswill helpourselfandothers every time changes areneeded.2 +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 by hosting 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. 3 3 4 -Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]].4 +Should you have any questions, please contact academy@emagiz.com. 5 5 6 -* Last update: May9th, 20217 -* Required reading time: 5minutes6 +* Last update: June 10th, 2021 7 +* Required reading time: 7 minutes 8 8 9 9 == 1. Prerequisites == 10 - 11 11 * Basic knowledge of the eMagiz platform 12 12 13 13 == 2. Key concepts == 13 +This microlearning centers around configuring your SOAP web service. 14 14 15 -This microlearning centers around using annotations. 16 -With annotations, we mean: A piece of text to explain something to yourself and others 15 +By configuring, we mean: Designing and determining the characteristics of the SOAP web service 17 17 18 -Annotations can be used for: 17 +Crucial parts in the configuration are: 18 +* Operation Name 19 +* SOAP Webservice Namespace 20 +* Validation 21 +* Authentication 19 19 20 - *Describingabest practiceeveryoneshouldfollow21 - *Describing(more complex) parts of the flow22 - *Describe(partsof) yourmessagedefinitions23 +Of these four points, we will zoom in on the validation part of our SOAP Webservice in this microlearning. 24 + 25 +== 3. Validate Incoming Messages == 23 23 24 - ==3. Annotations==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 by hosting 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. 25 25 26 -In this microlearning, we will focus on using annotations on the flow level to clarify our thought process. In the annotation, you either describe a best practice everyone should follow when they change that flow (i.e. within the asynchronous routing) or describe how the (more complex) parts of the flow work. This will help yourself and others every time changes are needed within the flow. 29 +Crucial parts in the configuration are: 30 +* Operation Name 31 +* SOAP Webservice Namespace 32 +* Validation 33 +* Authentication 27 27 28 - Annotations can be used for: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 rights credentials (security) and the right answers (validation) are allowed to enter and perform their actions. In the next microlearning, we will talk about the security part. In this microlearning, we talk about the validation part. 29 29 30 -* Describing a best practice everyone should follow 31 -* Describing (more complex) parts of the flow 32 -* Describe (parts of) your message definitions 37 +As you 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 of attributes. You can use such an XSD for the validation of what your clients send you. eMagiz will automatically define a WSDL based on the XSD that you provide that stores metainformation and stores the XSD for validation purposes. This way you can communicate the WSDL (location) to external parties as a reference document upon which they can build their solution. If you keep the eMagiz defaults you can access 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. 33 33 34 - To clarifytheusecasesletus takea look athowannotationscanbeadded withinthe eMagizplatform. In ourfirst example,we willtakealook atasynchronous routing.In manyeMagizprojects,abestpracticeisfollowed on howtoadd somethingto theasynchronousrouting (or changesomethingwithin theasynchronous routing).Becausethebestpracticecontainsmultiplesteps it makes sensetouse theannotationfunctionalityofeMagiztodefineallthesestepsandregisterthematthe placeyou need them(i.e.the asynchronousrouting).Havingdoneso will result insomething like this:39 +What eMagiz does need from you is the correct XSD for validation. As a starting point you should download the XSD that eMagiz has generated based on the system message(s) you have defined in the Design phase. Once you have that you can structure the XSD correctly. A valid XSD start with a schema segment. In this segment you need to define your SOAP WS namespace: 35 35 36 -[[image:Main.Images.Microlearning.WebHome@novice-devops-perspectives-annotations--annotation-best-practice-async-routing.png]] 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/"> 37 37 38 - Thesecondexampleis aboutusingannotationsontheflow leveltodescribepartsof the flow.In this example,we will use theannotation todescribe that weuseafiltertodeterminewhichmessagesare pickedupfrom alocaldirectoryandhow we filter. Thatway anyway openingtheflowhasto merely read theannotationto getthe context.Having doneso willresultin something like this:47 +Once you have that you need to copy all complex and simple types from the XSD that you downloaded and paste them below the lines you have created: 39 39 40 -[[image:Main.Images.Microlearning.WebHome@novice-devops-perspectives-annotations--describe-parts-of-flow.png]] 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> 41 41 42 -T hethird exampledoes nottake place on the flow level but the message definition level. Therefore instead ofgoing to Create, we go to Design.InDesign whenyou navigateto theCDM, API Gateway Data model,EventStreaming Data model,messagedefinitions,etc.youhavetheoptiontoaddannotationstothe canvas. In thisexample,wewant to make clear to all thatmakechangesthatacertainpart of our CDM is usedby alot of integrationswithineMagizandthereforeeveryoneshould becareful and think twicebefore adjusting anything related to that part. Having done so will result in something like this:74 +To wrap things up you need to define your Request and Response element and close the schema: 43 43 44 -[[image:Main.Images.Microlearning.WebHome@novice-devops-perspectives-annotations--describe-crucial-part-of-cdm.png]] 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> 45 45 46 - Nowthatwesawsomeexampleslet us turn our attentiontothe how.How canI addan annotationandhowcan Ilink it.Adding theannotation issimple. You dragthe annotationiconfromtheleftcontextmenu ontothecanvas.As aresult,an empty annotationwillbeshownontheanvas.Bydouble-clickingonityoucantype whatever youwant. Notethat youneed to be in"Start Editing"modetochangeanything, includingannotations.88 +Combining this will result in a valid XSD for my example. In your case, you will need to enter other values. When you are done with the creation of the XSD save it with a name such as spwbsrv-connector.xsd and upload it to the flow. After you have uploaded the XSD link it to the connector-xsd support object in your entry. 47 47 48 -[[image:Main.Images.Microlearning.WebHome@novice- devops-perspectives-annotations--annotation-icon-context-menu.png]]90 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages--uploaded-file.png]] 49 49 50 - Whenyouareatisfied with what you havewrittendownyoucan press the Saveutton. Afteryou have done so youcan rescale the annotationto ensurethat thecomplete textisvisible. To link theannotationto acomponent (on flow level) or an entity (ondefinitionlevel) you hover over the annotationuntil your mouseindicator changes to a + icon, execute a right-click and drag fromthe annotation to the componentin question.92 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages--file-linked-to-xsd-component.png]] 51 51 52 - Now you know whatannotationsare goodfor andhowyoucanaddthemwithin theeMagizplatform.94 +With this done you have successfully added validation to your SOAP web service. 53 53 54 54 == 4. Assignment == 55 55 56 -Add a nnotation ontheflowlevel that describeshow(apartof) a flow works.98 +Add validation to the SOAP Webservice we have been configuring. 57 57 This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. 58 58 59 59 == 5. Key takeaways == 60 60 61 -* Annotations can be used for: 62 - * Describing a best practice everyone should follow 63 - * Describing (more complex) parts of the flow 64 - * Describe (parts of) your message definitions 65 -* You can add annotations by dragging and dropping the annotation icon on the canvas. 103 +* Crucial parts in the configuration are: 104 + ** Operation Name 105 + ** SOAP Webservice Namespace 106 + ** Validation 107 + ** Authentication 108 +* Validation is done with the help of an XSD 109 +* The WSDL is used for external documentation 110 +* Use the XSD generated by eMagiz based on the system message as a starting point 66 66 67 67 == 6. Suggested Additional Readings == 68 68 69 - Thereare no suggestedadditionalreadingsonthis topic114 +If you are interested in this topic and want more information on it please read the help text provided by eMagiz. 70 70 71 71 == 7. Silent demonstration video == 72 72 73 - Thisvideodemonstrateshowyoucould havehandledheassignment andgivesyousomecontext onwhat you havejustlearned.118 +{{video attachment="novice-soap-webservice-connectivity-validate-incoming-messages.mp4" reference="Main.Videos.Microlearning.WebHome"/}} 74 74 75 -{{video attachment="novice-devops-perspectives-annotations.mp4" reference="Main.Videos.Microlearning.WebHome"/}} 76 - 77 77 )))((({{toc/}}))){{/container}}{{/container}}