Changes for page Validate Incoming Messages
Last modified by Erik Bakker on 2024/08/26 12:39
From version 38.1
edited by Erik Bakker
on 2022/08/22 15:37
on 2022/08/22 15:37
Change comment:
There is no comment for this version
To version 44.1
edited by Erik Bakker
on 2022/12/30 12:09
on 2022/12/30 12:09
Change comment:
There is no comment for this version
Summary
-
Page properties (2 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 - Content
-
... ... @@ -1,7 +1,7 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 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 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.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 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. 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 6 == 1. Prerequisites == 7 7 * Basic knowledge of the eMagiz platform ... ... @@ -9,7 +9,7 @@ 9 9 == 2. Key concepts == 10 10 This microlearning centers around configuring your SOAP web service. 11 11 12 -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. 13 13 14 14 Crucial parts in the configuration are: 15 15 * Operation Name ... ... @@ -21,7 +21,7 @@ 21 21 22 22 == 3. Validate Incoming Messages == 23 23 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 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. 25 25 26 26 Crucial parts in the configuration are: 27 27 * Operation Name ... ... @@ -29,71 +29,32 @@ 29 29 * Validation 30 30 * Authentication 31 31 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 r ightscredentials (security) and the right answers (validation) areallowed to enter and perform their actions. In thenextmicrolearning, wewilltalk about the security part. In this microlearning, we talk about the validation part.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 security part. In this microlearning, we talk about the validation part. 33 33 34 - 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 === 35 35 36 - 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. 37 37 38 -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 39 -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 40 - xmlns="http://www.academy.emagiz.com/ns/mlacade-bus/spwbsrv-connector/1.0/" 41 - attributeFormDefault="unqualified" elementFormDefault="unqualified" 42 - 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]] 43 43 44 - 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 === 45 45 46 -<xs:complexType name="Input"> 47 - <xs:sequence> 48 - <xs:element name="String" type="nonEmptyString"/> 49 - <xs:element minOccurs="0" name="Decimal" type="xs:decimal"/> 50 - <xs:element name="Enum" type="Enum"/> 51 - <xs:element name="Integer" type="xs:long"/> 52 - <xs:element name="Boolean" type="xs:boolean"/> 53 - <xs:element minOccurs="0" name="DateTime" type="xs:dateTime"/> 54 - </xs:sequence> 55 - </xs:complexType> 56 - <xs:simpleType name="nonEmptyString"> 57 - <xs:restriction base="xs:string"> 58 - <xs:minLength value="1"/> 59 - </xs:restriction> 60 - </xs:simpleType> 61 - <xs:simpleType name="Enum"> 62 - <xs:restriction base="xs:string"> 63 - <xs:enumeration value="URGENT"/> 64 - <xs:enumeration value="HIGH"/> 65 - <xs:enumeration value="MEDIUM"/> 66 - <xs:enumeration value="LOW"/> 67 - <xs:enumeration value="PLANNING"/> 68 - </xs:restriction> 69 - </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. 70 70 71 - 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]] 72 72 73 -<xs:element name="SendNptRequest"> 74 - <xs:complexType> 75 - <xs:sequence> 76 - <xs:element name="Input" type="Input"/> 77 - </xs:sequence> 78 - </xs:complexType> 79 - </xs:element> 80 - <xs:element name="SendNptResponse"> 81 - <xs:complexType/> 82 - </xs:element> 83 - </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}} 84 84 85 - Combiningthiswill resultinavalid XSD formyexample.Inyourcase,youwillneedtoerthervalues. Whenyouare donewiththecreationof theXSD saveitwithanamesuchasspwbsrv-connector.xsdanduploaditto the flow. After youhaveuploaded the XSDlink it toheconnector-xsd support objectin yourentry.48 +In this same support object, you also see the default location of the hosted SOAP endpoint, which is http://localhost:${entry.connector.ws.port}/ws/{soap WS name}/. Based on this, you can find the WSDL by adding {soap WS name}.wsdl to the URI. In this example, when hosting the SOAP web service on-premise, a valid URI would be "http://localhost:8099/ws/soapgn3-connector/soapgn3-connector.wsdl". 86 86 87 - [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages--uploaded-file.png]]50 +{{info}}Note that when running your web service in the eMagiz cloud, the first part (the host part) will change depending on your configuration in Deploy Architecture and the cloud slot on which you are running. An example URI, in that case, would be "https://soap-test-cloud0000.emagizcloud.com/ws/soapgn3-connector/soapgn3-connector.wsdl"{{/info}} 88 88 89 - [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages--file-linked-to-xsd-component.png]]52 +With this done, you have successfully added validation to your SOAP web service. 90 90 91 -With this done you have successfully added validation to your SOAP web service. 92 - 93 93 == 4. Assignment == 94 94 95 95 Add validation to the SOAP Webservice we have been configuring. 96 -This assignment can be completed with the help of the (Academy) project thatyouhavecreated/used in the previous assignment.57 +This assignment can be completed with the help of the (Academy) project you created/used in the previous assignment. 97 97 98 98 == 5. Key takeaways == 99 99 ... ... @@ -100,15 +100,16 @@ 100 100 * Crucial parts in the configuration are: 101 101 ** Operation Name 102 102 ** SOAP Webservice Namespace 103 - ** Validation64 + ** validationvalidation 104 104 ** Authentication 105 105 * Validation is done with the help of an XSD 106 106 * The WSDL is used for external documentation 107 -* Use the XSD generated by eMagiz based on the system message as a starting point 68 +* eMagiz will automatically generate the WSDL for you based on your system messages 69 +** Do not forget to add the correct root entity to your system message to make the WSDL work 108 108 109 109 == 6. Suggested Additional Readings == 110 110 111 -If you are interested in this topic and want more information on itplease read the help text provided by eMagiz.73 +If you are interested in this topic and want more information, please read the help text provided by eMagiz. 112 112 113 113 == 7. Silent demonstration video == 114 114