Changes for page Endpoint Check
Last modified by Danniar Firdausy on 2024/09/04 10:26
From version 19.1
edited by eMagiz
on 2022/05/22 21:30
on 2022/05/22 21:30
Change comment:
There is no comment for this version
To version 45.1
edited by Erik Bakker
on 2022/12/30 12:27
on 2022/12/30 12:27
Change comment:
There is no comment for this version
Summary
-
Page properties (5 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 4 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,0 +1,1 @@ 1 +Endpoint Check - Parent
-
... ... @@ -1,0 +1,1 @@ 1 +Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. marijn1 +XWiki.ebakker - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,97 +1,92 @@ 1 -{{html wiki="true"}} 2 -<div class="ez-academy"> 3 - <div class="ez-academy_body"> 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 by hosting a SOAP Webservice in eMagiz that handles XML messages asynchronously or synchronously. One last check to perform before you can communicate with the external parties that the endpoint is available to receive messages and up and running. In this microlearning, we will learn how you can perform such a check. 4 4 5 -<div class="doc"> 6 - 7 - 8 - 9 -= Annotations = 10 - 11 -In this microlearning, we will focus on using annotations to clarify your 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), describe how the (more complex) parts of the flow work or describe (parts of) of your message definitions (i.e. CDM, API Gateway Data model, system message, etc.). This will help yourself and others every time changes are needed. 12 - 13 13 Should you have any questions, please contact academy@emagiz.com. 14 14 15 -* Last update: May 9th, 2021 16 -* Required reading time: 5 minutes 17 - 18 18 == 1. Prerequisites == 19 - 20 20 * Basic knowledge of the eMagiz platform 21 21 22 22 == 2. Key concepts == 10 +This microlearning centers around the endpoint check. 23 23 24 -This microlearning centers around using annotations. 25 -With annotations, we mean: A piece of text to explain something to yourself and others 12 +By endpoint check, we mean: determine whether the WSDL is accessible on the correct endpoint so we can forward the URL to the WSDL + the URL to call to our external parties 26 26 27 -Annotations can be used for: 14 +The endpoint consists of the following elements: 15 +* Starts with https:// or http:// 16 +* Second part is the host (i.e. where is the endpoint running) 17 +* Third part is the port on which the incoming traffic is accepted 18 +* These three things combined make up the first part of our endpoint that will vary per environment 19 +* Following that we have a static remainder of the endpoint that is build up as follows: /ws/{path-specific-servlet-mapping}/ 20 +* If you want to get to the WSDL simply add the name of the WSDL and the .wsdl extension to the endpoint when viewing it in the browser 28 28 29 -* Describing a best practice everyone should follow 30 -* Describing (more complex) parts of the flow 31 -* Describe (parts of) your message definitions 22 +== 3. Endpoint Check == 32 32 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 by hosting a SOAP Webservice in eMagiz that handles XML messages asynchronously or synchronously. One last check to perform before you can communicate with the external parties that the endpoint is available to receive messages and up and running. In this microlearning, we will learn how you can perform such a check. 33 33 26 +The endpoint consists of the following elements: 27 +* Starts with https:// or http:// 28 +* Second part is the host (i.e. where is the endpoint running) 29 +* Third part is the port on which the incoming traffic is accepted 30 +* These three things combined make up the first part of our endpoint that will vary per environment 31 +* Following that we have a static remainder of the endpoint that is build up as follows: /{context-path}/{path-specific-servlet-mapping}/ 32 +* If you want to get to the WSDL simply add the name of the WSDL and the .wsdl extension to the endpoint when viewing it in the browser 34 34 35 - ==3.Annotations==34 +As you can see the endpoint can be divided into two parts. One part is dynamic across environments and one part is static across environments. Let us first determine how we can find out the first part of our endpoint. 36 36 37 - Inthis microlearning, we will focus on using annotations on the flow level to clarify our thought process.Inthe annotation, you eitherdescribe 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.Thiswill help yourself and others every time changes are needed within the flow.36 +=== 3.1 HTTPS or HTTP === 38 38 39 -Annotations can be usedfor:38 +We start at the top with the determination of HTTPS or HTTP. A simple rule of thumb is that when running in the eMagiz Cloud the endpoint starts with https:// and when the endpoint is running locally (i.e. on-premise) the endpoint starts with http:// (unless you secure it yourself, more on that later). 40 40 41 -* Describing a best practice everyone should follow 42 -* Describing (more complex) parts of the flow 43 -* Describe (parts of) your message definitions 40 +=== 3.2 Host === 44 44 45 -T oclarifytheusecasesletus takealookathowannotationscanbe addedwithin the eMagizplatform.Inourfirstexample,wewilltakealookat asynchronousrouting.Inmany eMagiz projects,abest practiceisfollowedonhowtoadd somethingtotheasynchronousrouting(orchangesomethingwithin the asynchronousrouting).Because thebestpracticecontains multiplestepsitmakessensesetheannotation functionalityofeMagiztodefine allhesestepsandregisterthemat theplaceyouneedthem(i.e.the asynchronousrouting).Havingdone sowillresultinsomethinglikethis:42 +The next part of the endpoint is the host. The host is effectively the (virtual) machine on which the endpoint is running. When hosting an endpoint in the eMagiz cloud the host part is the combination between the DNS left-most label on Route level and the cloudslot on which your environment is running. The first part of the equation can be found under Deploy -> Architecture. The second part can be found under Deploy -> Properties by looking for the {technicalnameproject}.amqp01.host. You need to combine the two elements via a dash -. An example of this would then be spwbsrv-test-cloud0001.emagizcloud.com. In case of an on-premise installation, you should ask your customer what the IP address or DNS name is to connect to the machine on which your runtime is running. If the runtime is running locally on your laptop the host equals localhost. 46 46 47 - <p align="center">[[image:novice-devops-perspectives-annotations--annotation-best-practice-async-routing.png||]]</p>44 +=== 3.3 Port === 48 48 49 - Thesecondexampleisaboutusingannotations on theflowleveltodescribepartsof theflow. Inhisexample, wewilluse theannotationodescribethatweusea filtertodeterminewhichmessagesare pickedupfromalocaldirectoryand howwefilter.Thatwayanyway opening the flowhas tomerelyreadthe annotationtogetthe context.Havingdonesowillresult insomethinglike this:46 +Whether or not the port needs to be defined to get to the endpoint is once again determined by the location. If the endpoint is hosted in the eMagiz Cloud the port is *not* part of the endpoint. However, when you host your endpoint locally the endpoint becomes part of your endpoint. Note that to make this piece work in the eMagiz Cloud you should set up your Route properly. More on that in our Cloud Management courses. You can determine the port, for the endpoint or the route, by navigating to the infra flow of the runtime through which you host your SOAP web service. In the infra flow you can also find the remainder of the path to get to the WSDL location. 50 50 51 - <palign="center">[[image:novice-devops-perspectives-annotations--describe-parts-of-flow.png||]]</p>48 +In the infra flow there is a support object of the type "Dynamic WSDL". In here you 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". 52 52 53 - The third example doesnot takeplaceonthe flowlevelbutthemessage definitionlevel. ThereforeinsteadofgoingtoCreate,wego toDesign.InDesignwhen you navigate totheCDM, API GatewayData model, EventStreamingDatamodel,message definitions,etc.youhavethe optionto add annotations to the canvas.Inthisexample,we wantto make clear to all thatmakechangesthat a certainpartof our CDM is used bya lotof integrationswithineMagizand therefore everyone shouldbecareful and think twice beforeadjustinganything related tothat part. Havingdonesowillresultinsomething like this: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}} 54 54 55 - <p align="center">[[image:novice-devops-perspectives-annotations--describe-crucial-part-of-cdm.png||]]</p>52 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages-gen3--dynamic-wsdl-support-object-infra.png]] 56 56 57 - Nowthat we saw some examples let us turn our attention to the how.How can I add an annotation and how can I link it. Adding theannotation is simple. You drag the annotation iconfrom the left context menu onto the canvas. As a result, an emptyannotationwill be shown on the canvas. By double-clickingon ityou can type whateveryou want. Note that you need to be in "StartEditing" mode tochange anything, including annotations.54 +=== 3.5 Verifying the WSDL location === 58 58 59 - <palign="center">[[image:novice-devops-perspectives-annotations--annotation-icon-context-menu.png||]]</p>56 +To get to the WSDL to verify if it is available to be shared with external parties the last thing you need is the WSDL name. You can find this one, surprisingly enough, in the Jetty component. To get to the WSDL name double click on the servlet that is defined under the heading Servlets and navigate to the Advanced tab. Here you will see the name of the WSDL. If you have adhered to the default of eMagiz the name will mimic the name of your path-specific servlet mapping. 60 60 61 - When youaresatisfied with what you have writtendown you can press the Save button.After you havedoneso youcanrescaletheannotationtoensure that the complete text is visible. To link the annotation to acomponent (on flowlevel) oran entity (onmessage definition level) you hover over the annotation untilyour mouseindicator changes to a +icon, execute a right-clickanddrag from the annotation to the component in question.58 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-endpoint-check--wsdl-name.png]] 62 62 63 -Now you know what annotations are good for and how you can add them within the eMagiz platform. 60 +With this information we could reach the WSDL via the following endpoint, assuming we run in the eMagiz Cloud: 61 +* https://spwbsrv-test-cloud0001.emagizcloud.com/ws/spwbsrv-connector/spwbsrv-connector.wsdl 64 64 65 -===== Practice ===== 63 +With this information we could reach the WSDL via the following endpoint, assuming we run locally on our laptop: 64 +* http://localhost:9091/ws/spwbsrv-connector/spwbsrv-connector.wsdl 66 66 66 +With this information, you should be able to access the WSDL and communicate both the endpoint as well as the WSDL to your external parties. 67 + 67 67 == 4. Assignment == 68 68 69 - Add annotationonthe flowlevelthatdescribeshow(a part of) a flow works.70 +Determine the endpoint of your SOAP Webservice and retrieve the WSDL. 70 70 This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. 71 71 72 72 == 5. Key takeaways == 73 73 74 -* Annotations can be used for: 75 - * Describing a best practice everyone should follow 76 - * Describing (more complex) parts of the flow 77 - * Describe (parts of) your message definitions 78 -* You can add annotations by dragging and dropping the annotation icon on the canvas. 75 +* The endpoint consists of the following elements: 76 + ** Starts with https:// or http:// 77 + ** Second part is the host (i.e. where is the endpoint running) 78 + ** Third part is the port on which the incoming traffic is accepted 79 + ** These three things combined make up the first part of our endpoint that will vary per environment 80 + ** Following that we have a static remainder of the endpoint that is build up as follows: /{context-path}/{path-specific-servlet-mapping}/ 81 + ** If you want to get to the WSDL simply add the name of the WSDL and the .wsdl extension to the endpoint when viewing it in the browser 82 +* The relevant information can be derived from the Jetty component and by determining where the endpoint is hosted 79 79 80 - 81 - 82 82 == 6. Suggested Additional Readings == 83 83 84 - Thereare no suggestedadditionalreadingsonthis topic86 +If you are interested in this topic and want more information on it please read the help text provided by eMagiz. 85 85 86 86 == 7. Silent demonstration video == 87 87 88 - Thisvideodemonstrates how you could have handledtheassignmentand givesyousometexton whatuhavejustlearned.90 +{{video attachment="novice-soap-webservice-connectivity-endpoint-check.mp4" reference="Main.Videos.Microlearning.WebHome"/}} 89 89 90 -<iframe width="1280" height="720" src="../../vid/microlearning/novice-devops-perspectives-annotations.mp4" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 91 - 92 -</div> 93 - 94 -</div> 95 -</div> 96 - 97 -{{/html}} 92 +)))((({{toc/}}))){{/container}}{{/container}}
- novice-devops-perspectives-annotations--annotation-best-practice-async-routing.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.marijn - Size
-
... ... @@ -1,1 +1,0 @@ 1 -25.7 KB - Content
- novice-devops-perspectives-annotations--annotation-icon-context-menu.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.marijn - Size
-
... ... @@ -1,1 +1,0 @@ 1 -774 bytes - Content
- novice-devops-perspectives-annotations--describe-crucial-part-of-cdm.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.marijn - Size
-
... ... @@ -1,1 +1,0 @@ 1 -15.5 KB - Content
- novice-devops-perspectives-annotations--describe-parts-of-flow.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.marijn - Size
-
... ... @@ -1,1 +1,0 @@ 1 -18.9 KB - Content