Version 35.2 by Erik Bakker on 2022/06/12 09:35

Hide last authors
Erik Bakker 35.1 1 {{container}}{{container layoutStyle="columns"}}(((
2 When talking to external parties via a SOAP web service you need to define in eMagiz that you want to call a SOAP web service so eMagiz will form a correct SOAP message. On top of the call there is a support object in eMagiz that will help you with the analysis of your problems when calling the SOAP web service. In this microlearning, we will learn how to call a SOAP web service from eMagiz.
eMagiz 1.1 3
Erik Bakker 34.1 4 Should you have any questions, please contact academy@emagiz.com.
eMagiz 1.1 5
Erik Bakker 35.1 6 * Last update: April 1st, 2022
7 * Required reading time: 5 minutes
eMagiz 1.1 8
9 == 1. Prerequisites ==
10 * Basic knowledge of the eMagiz platform
11
12 == 2. Key concepts ==
Erik Bakker 35.1 13 This microlearning centers around calling a SOAP Webservice.
eMagiz 1.1 14
Erik Bakker 35.1 15 With SOAP, we mean: A messaging protocol specification for exchanging structured information in the implementation of web services in computer networks.
eMagiz 1.1 16
Erik Bakker 35.1 17 * To call a REST Webservice you need either:
18 ** A Web Service Outbound Gateway
19 * Critical information when configuring this component:
20 ** URL
21 ** Retry Advice
22 ** Error Handling
23 ** Authentication
Erik Bakker 34.1 24
Erik Bakker 35.1 25 == 3. Calling a SOAP Webservice ==
eMagiz 1.1 26
Erik Bakker 35.1 27 When talking to external parties via a SOAP web service you need to define in eMagiz that you want to call a SOAP web service so eMagiz will form a correct SOAP message. On top of the call there is a support object in eMagiz that will help you with the analysis of your problems when calling the SOAP web service. In this microlearning, we will learn how to call a SOAP web service from eMagiz.
eMagiz 1.1 28
Erik Bakker 35.1 29 Calling a SOAP Webservice within eMagiz can be done with the help of a Web Service Outbound Gateway. To correctly configure this component you need to consider the following elements:
30
31 * URL
32 * Retry Advice
33 * Error Handling
Erik Bakker 34.1 34 * Authentication
eMagiz 1.1 35
Erik Bakker 35.1 36 We will discuss the first three items in this list in this microlearning. In the microlearnings that will follow this microlearning, we will delve deeper into various authentication possibilities.
eMagiz 1.1 37
Erik Bakker 35.1 38 Before we delve into the configuration of the component let us first move to Create and open an exit flow in which we want to call the SOAP Webservice. When you open the exit flow it will look similar to this:
eMagiz 1.1 39
Erik Bakker 35.1 40 [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--exit-flow-starting-point.png]]
eMagiz 1.1 41
Erik Bakker 35.1 42 Now that we have opened the flow and are in "Start Editing" mode we need to add the web service outbound gateway to start with.
eMagiz 1.1 43
Erik Bakker 35.1 44 [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component.png]]
eMagiz 1.1 45
Erik Bakker 35.1 46 === 3.1 URL ===
eMagiz 1.1 47
Erik Bakker 35.1 48 Now that we have added the correct component to the canvas it has become time to configure the component correctly. The first thing to configure when calling a SOAP Webservice is determining and registering the endpoint (URL) eMagiz should call to deliver the message too. As always in scenarios where an information element can change between environments, you should use a property reference and determine the correct value on a per-environment basis.
Erik Bakker 34.1 49
Erik Bakker 35.1 50 [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-url.png]]
Erik Bakker 34.1 51
Erik Bakker 35.1 52 === 3.2 Retry Advice ===
Erik Bakker 34.1 53
Erik Bakker 35.1 54 The second setting we need to configure is the retry advice. With retry advice, you can guard your solution against temporary connection losses between eMagiz and the external party. As this can happen from time to time the best practice is to configure such a Retry Advice on every Web Service Outbound component. To add the Retry Advice move to the Advanced tab and move down to the Request handler advice chain segment. Within this segment, you will see a button called Retry Advice.
Erik Bakker 34.1 55
Erik Bakker 35.1 56 [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-button.png]]
Erik Bakker 34.1 57
Erik Bakker 35.1 58 When you click on the Retry Advice button you will be prompted with a pop-up. In here you need to configure the exact settings
Erik Bakker 34.1 59
Erik Bakker 35.1 60 [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-pop-up-empty.png]]
Erik Bakker 34.1 61
Erik Bakker 35.1 62 The best practice for this configuration is as follows for asynchronous solutions:
63 * Select the option called Simple Retry Policy
64 * Set the max attempts at 6
65 * Select the Fixed back off policy
66 * Set the backoff period at 5000 (ms)
Erik Bakker 34.1 67
Erik Bakker 35.1 68 When you have done so the configuration should look as follows. The only thing left is to press Save to save your Retry Advice configuration
Erik Bakker 34.1 69
Erik Bakker 35.1 70 [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-pop-up-filled-in.png]]
Erik Bakker 34.1 71
Erik Bakker 35.1 72 === 3.3 Error Handling ===
Erik Bakker 34.1 73
Erik Bakker 35.1 74 When calling a SOAP Web service with the configuration we have defined up till here you could suffer from cryptic error response you get back when the SOAP web service call fails. To improve the error handling to make your life easier when analyzing the problem you need to add a support object to the canvas and link it to the web service outbound gateway. This support object is named "Detailed SOAP Fault Message Resolver".
Erik Bakker 34.1 75
Erik Bakker 35.1 76 To link the support object to your web service outbound gateway you open the web service outbound gateway, navigate to the Advanced tab, and select the Fault message resolver. Afterward press Save to save the link between the components.
Erik Bakker 34.1 77
Erik Bakker 35.1 78 [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-fault-message-resolver.png]]
Erik Bakker 34.1 79
Erik Bakker 35.1 80 Now that we have configured the HTTP Outbound component to our liking we can press Save on the component level to store our changes. As a result the flow will look as follows:
Erik Bakker 34.1 81
Erik Bakker 35.1 82 [[image:Main.Images.Microlearning.WebHome@microlearning/novice-soap-webservice-connectivity-calling-a-soap-webservice--flow-result.png]]
83
eMagiz 1.1 84 == 4. Assignment ==
85
Erik Bakker 35.1 86 Build a flow within your project in which you do a call to an external party that hosts a SOAP web service.
eMagiz 1.1 87 This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment.
88
89 == 5. Key takeaways ==
90
Erik Bakker 35.1 91 * eMagiz will create a valid SOAP message when using this component
92 * eMagiz provides a support object for better error handling of SOAP faults
93 * There are four key configuration elements:
94 ** URL
95 ** Retry Advice
96 ** Error Handling
Erik Bakker 34.1 97 ** Authentication
eMagiz 1.1 98
99 == 6. Suggested Additional Readings ==
100
Erik Bakker 34.1 101 If you are interested in this topic and want more information on it please read the help text provided by eMagiz.
eMagiz 1.1 102
103 == 7. Silent demonstration video ==
104
Erik Bakker 35.1 105 {{video attachment="novice-soap-webservice-connectivity-calling-a-soap-webservice.mp4" reference="Main.Videos.Microlearning.WebHome"/}}
eMagiz 1.1 106
Erik Bakker 21.1 107 )))((({{toc/}}))){{/container}}{{/container}}