Changes for page Endpoint Check
Last modified by Danniar Firdausy on 2024/09/04 10:26
From version 44.1
edited by Erik Bakker
on 2022/12/30 12:24
on 2022/12/30 12:24
Change comment:
There is no comment for this version
To version 34.2
edited by Erik Bakker
on 2022/06/12 09:34
on 2022/06/12 09:34
Change comment:
Update document after refactoring.
Summary
-
Page properties (4 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - EndpointCheck1 +novice-soap-webservice-connectivity-calling-a-soap-webservice - Parent
-
... ... @@ -1,1 +1,1 @@ 1 - Main.eMagiz Academy.Microlearnings.Novice.SOAPWebservice Connectivity.WebHome1 +WebHome - Default language
-
... ... @@ -1,1 +1,0 @@ 1 -en - Content
-
... ... @@ -1,109 +1,92 @@ 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 by hosting a SOAP Webservice in eMagiz that handles XML messages asynchronously or synchronously. Onelastcheckto performbefore you cancommunicate withtheexternalpartiesthatthe endpoint isavailable to receive messages andupandrunning.Inthis microlearning,wewilllearnhowyou canperformsuchacheck.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 learn the basics of this configuration in the various phases of the platform so you can easily set up your SOAP web service. 3 3 4 4 Should you have any questions, please contact academy@emagiz.com. 5 5 6 +* Last update: June 10th, 2021 7 +* Required reading time: 7 minutes 8 + 6 6 == 1. Prerequisites == 7 7 * Basic knowledge of the eMagiz platform 8 8 9 9 == 2. Key concepts == 10 -This microlearning centers around the endpointcheck.13 +This microlearning centers around configuring your SOAP web service. 11 11 12 -By endpoint check, we mean:determinewhetherthe WSDLis accessible on the correctndpointowe can forwardtheURL to the WSDL+ theURL to call to ourexternal parties15 +By configuring, we mean: Designing and determining the characteristics of the SOAP web service 13 13 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 17 +Crucial parts in the configuration are: 18 +* Operation Name 19 +* SOAP Webservice Namespace 20 +* Validation 21 +* Authentication 21 21 22 -== 3. Endpoint Check == 23 +Of these four points, the last two will be discussed in separate microlearnings. 24 + 25 +== 3. Configure your SOAP Webservice == 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 by hosting a SOAP Webservice in eMagiz that handles XML messages asynchronously or synchronously. Onelastcheckto performbefore you cancommunicate withtheexternalpartiesthatthe endpoint isavailable to receive messages andupandrunning.Inthis microlearning,wewilllearnhowyou canperformsuchacheck.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 learn the basics of this configuration in the various phases of the platform so you can easily set up your SOAP web service. 25 25 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 29 +Crucial parts in the configuration are: 30 +* Operation Name 31 +* SOAP Webservice Namespace 32 +* Validation 33 +* Authentication 33 33 34 - Asyoucan see the endpoint canbedivided into twoparts.Onepart isdynamic across environments and onepart is static acrossenvironments.Let us first determinehowwe canfind out thefirstpart ofourendpoint.35 +Of these four points, the last two will be discussed in separate microlearnings. In this microlearning, we will focus on the first two aspects of the configuration. As you might have noticed I did not mention the fact whether the integration is synchronous or asynchronous as a crucial part of the configuration. The reason being that when configuring a (SOAP) web service you always need to send an acknowledgment back to the client calling the web service to let them know what the status of the message is. In case you want to set up the rest of your integration asynchronously you can send an empty message back as acknowledgment. In case you want to set up the rest of your integration synchronously you need to send the response you have received from the backend operation back to the client. More on the choice between asynchronous and synchronous in a later stage. 35 35 36 -=== 3.1 HTTPS orHTTP===37 +=== 3.1 Operation Name === 37 37 38 - We startatthe topwiththedeterminationofHTTPSorHTTP.Asimpleruleofthumbisthatwhen running inthe eMagiz Cloudthe endpointstartswith https://andwhenthe endpointis runninglocally(i.e.on-premise)theendpoint startswithhttp://(unlessyousecure ityourself,more on thatlater).39 +Let us first zoom in on the parts of the configuration before we learn how you can implement it in eMagiz. Starting with the operation name. When you have dealt with the API Gateway offering of eMagiz in the past or have some knowledge of how APIs work the notion of an operation name should not be unfamiliar. In essence, it is a unique name that defines a certain operation. In eMagiz the best practice for naming the operation is as follows: 39 39 40 - ===3.2 Host===41 +* Send{technicalnameoftheoperation} 41 41 42 - Theextpartoftheendpointis thehost. Thehostis effectively the (virtual)machineon which theendpointis running. When hostingan endpointin theeMagizcloud thehostpartis thecombination between the DNS left-most label onRoutelevelandthecloudslot onwhich your environment isrunning. Thefirstpartofthe equationcanbefound underDeploy -> Architecture.Thesecond part can befound under Deploy-> Properties by lookingfor the {technicalnameproject}.amqp01.host.You need tocombinehetwoelements via adash-.An exampleofthiswouldthenbepwbsrv-test-cloud0001.emagizcloud.com.In case of an on-premise installation,youshouldask your customer what theIP addressor DNS name istoconnectto themachineon which your runtime isrunning. Iftheruntime isrunning locally on your laptop the host equals localhost.43 +When you are in Create you will notice that eMagiz uses the default suffix of Request and Response is added to the operation name. Therefore the full operation name a client needs to call to get the desired result if you adhere to the best practice is: 43 43 44 - ===3.3 Port===45 +* Send{technicalnameoftheoperation}Request 45 45 46 - Whetheror 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 yourSOAPweb.In the infraflow you can also find the remainder of thepath to getto the WSDL location.47 +=== 3.2 SOAP Webservice Namespace === 47 47 48 - In theinfraflowthereis a supportbjectofthetype "Dynamic WSDL".In here youseethedefault locationof the hostedSOAP endpoint, whichishttp://localhost:${entry.connector.ws.port}/ws/{soap WSname}/.Basedonthis,youcanfind theWSDL by adding{soapWSname}.wsdlto theURI. In thisexample,whenhostingtheSOAP web serviceon-premise,avalidURI wouldbe"http://localhost:8099/ws/soapgn3-connector/soapgn3-connector.wsdl".49 +The second part of the configuration is the SOAP Webservice Namespace. When hosting a SOAP Webservice via the standard eMagiz tooling you need to define a namespace. To smoothen this process eMagiz automatically generates a namespace based on the configuration settings you choose in the Design phase of eMagiz. 49 49 50 - {{info}}Notethatwhen running your web service inthe eMagiz cloud, thefirst part (the host part) will change depending on yourconfiguration inDeploy Architectureand 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}}51 +=== 3.3 Configuration in eMagiz === 51 51 52 - [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-validate-incoming-messages-gen3--dynamic-wsdl-support-object-infra.png]]53 +Now that we know what configurations are required, we can see how we can implement this in eMagiz. In the Capture phase, nothing changes. You simply draw a system on the canvas including at least one line that goes from the system towards eMagiz. When you are done you move to the Design phase in eMagiz. In this phase, you need to correctly set up the operation name(s) and the SOAP Webservice Namespace. 53 53 54 - First,wenavigatetotheallentrywehavecreatedand open theJettycomponent.Thefirstsegmentof theJettyServertalksabouttheserverconnector.In thispart, theportis defined(eithervia a propertyor statically).55 +The configuration in Design starts at the system level. At the system level, you need to define the technical name (or let eMagiz automatically fill it in for you) and select the checkbox called Combined Entry Connector. By selecting this checkbox you tell eMagiz that you want to host an endpoint for others to call. 55 55 56 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity- endpoint-check--server-connector-settings.png]]57 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-configure-your-soap-webservice--combined-entry-check.png]] 57 57 58 - If it isdefined via a propertyyou can search for thecorresponding valueunder Deploy -> Properties by checkingontheproperty name and filteringonruntime level toget to theport. If it is definedstaticallyyoucan simplyreadit here.Note that the best practiceistouseaproperty value as that allows you to use a different range for your port numbering between environments. Inother words,it allowsyou to use the 9000 range for Test, the8000 rangefor Acceptance, and the9000 rangeforProduction.Thisis also to safeguard against someoneaccidentally sendingdata tothe wrong environment.59 +As you can see, selecting this option opens up a new choice to make. In this case between SOAP Webservice and Custom. 59 59 60 - === 3.3 ContextPath===61 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-configure-your-soap-webservice--combined-entry-choice.png]] 61 61 62 - Thefirstpartof the staticremainder oftheendpoint is thecontext.By default, thisis filledwith /ws butyouas a usercan alterthis. You cancheckthecurrentvaluey opening theJetty componentagainandlookingat theontextpath that isfilled in.63 +In this case, we opt for the SOAP web service. After you have done so eMagiz will automatically define the SOAP Webservice Name and SOAP Webservice Namespace. 63 63 64 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity- endpoint-check--context-path.png]]65 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-configure-your-soap-webservice--combined-entry-soap-ws-namespace.png]] 65 65 66 - ===3.4PathSpecificServletMapping===67 +With this, you are done with your configuration on the system level. Don't forget to update the status of your task. Now that we have configured the system it is time to configure the integration that is drawn from the system to eMagiz. We can do so by double-clicking on it (or by accessing the context menu and selecting the edit option). When you open the Edit page on the integration level you will notice that a new segment is added (compared to other integrations). This segment defines the settings on the system level we have just specified and defines the operation name. 67 67 68 - The last part of ourendpoint is determined by the path-specificservlet mapping.You canncegain find thealue(andchangeitf you want to) within the Jettymponent. In this component,youcan see the servlet mappingsnd see thepath that belongs to that servlet. For SOAP Webservicethebest practice isto have only one servlet-mapping and in 99% ofthecases, the auto-generated value of eMagiz is more thanfine.69 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-configure-your-soap-webservice--edit-integration.png]] 69 69 70 - [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-endpoint-check--path-specific-servlet-mapping.png]]71 +As you can see eMagiz has already prefilled the operation name for you based on the best practice at eMagiz. If you want to change you have the option to do so. Do note that for the sake of consistency it would be smart to use the same naming convention within a single project to avoid confusion. 71 71 72 -Combining all of this, assuming we run in the eMagiz Cloud, will result in the following endpoint for our Test environment: 73 -* https://spwbsrv-test-cloud0001.emagizcloud.com/ws/spwbsrv-connector/ 73 +=== 3.4 Add integration to Create === 74 74 75 -Combining all of this, assuming we run locally on our laptop, will result in the following endpoint for our Test environment: 76 -* http://localhost:9091/ws/spwbsrv-connector/ 75 +Now that we have finished the configuration in Design the last step of this microlearning is to add the integration to Create. You can simply do so by navigating to Create -> Add integrations and selecting the integration to move it to Create. After you have selected it press Save to add the integration to Create. 77 77 78 -=== 3.5 Getting the WSDL name === 79 - 80 -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. 81 - 82 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-endpoint-check--wsdl-name.png]] 83 - 84 -With this information we could reach the WSDL via the following endpoint, assuming we run in the eMagiz Cloud: 85 -* https://spwbsrv-test-cloud0001.emagizcloud.com/ws/spwbsrv-connector/spwbsrv-connector.wsdl 86 - 87 -With this information we could reach the WSDL via the following endpoint, assuming we run locally on our laptop: 88 -* http://localhost:9091/ws/spwbsrv-connector/spwbsrv-connector.wsdl 89 - 90 -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. 91 - 92 92 == 4. Assignment == 93 93 94 - Determine theendpoint ofyourSOAP WebserviceandretrievetheWSDL.79 +Configure a SOAP web service that consists of at least one operation and add it to Create. 95 95 This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. 96 96 97 97 == 5. Key takeaways == 98 98 99 -* The endpoint consists of the following elements: 100 - ** Starts with https:// or http:// 101 - ** Second part is the host (i.e. where is the endpoint running) 102 - ** Third part is the port on which the incoming traffic is accepted 103 - ** These three things combined make up the first part of our endpoint that will vary per environment 104 - ** Following that we have a static remainder of the endpoint that is build up as follows: /{context-path}/{path-specific-servlet-mapping}/ 105 - ** 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 106 -* The relevant information can be derived from the Jetty component and by determining where the endpoint is hosted 84 +* Crucial parts in the configuration are: 85 + ** Operation Name 86 + ** SOAP Webservice Namespace 87 + ** Validation 88 + ** Authentication 89 +* For ease, you can use the default naming convention of eMagiz 107 107 108 108 == 6. Suggested Additional Readings == 109 109 ... ... @@ -111,6 +111,6 @@ 111 111 112 112 == 7. Silent demonstration video == 113 113 114 -{{video attachment="novice-soap-webservice-connectivity- endpoint-check.mp4" reference="Main.Videos.Microlearning.WebHome"/}}97 +{{video attachment="novice-soap-webservice-connectivity-configure-your-soap-webservice.mp4" reference="Main.Videos.Microlearning.WebHome"/}} 115 115 116 116 )))((({{toc/}}))){{/container}}{{/container}}