Last modified by Erik Bakker on 2024/08/26 12:56

From version 39.1
edited by Carlijn Kokkeler
on 2024/08/21 16:36
Change comment: There is no comment for this version
To version 33.1
edited by Erik Bakker
on 2022/06/12 09:14
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Calling a SOAP Web service
1 +novice-soap-webservice-connectivity-configure-your-soap-webservice
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.CarlijnKokkeler
1 +XWiki.ebakker
Default language
... ... @@ -1,1 +1,0 @@
1 -en
Content
... ... @@ -1,109 +1,67 @@
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.
1 +{{container}}{{container layoutStyle="columns"}}(((
2 +In some cases, the input you receive or the output that you need to send to an external party cannot handle all characters or the input or output is written with the help of a character set. In this microlearning, we will learn how you can define the character set for file-based connectivity to ensure that you can process and deliver files according to the specifications.
3 3  
4 -Should you have any questions, please contact academy@emagiz.com.
4 +Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]].
5 5  
6 +* Last update: May 31th, 2021
7 +* Required reading time: 7 minutes
8 +
6 6  == 1. Prerequisites ==
10 +
7 7  * Basic knowledge of the eMagiz platform
8 8  
9 9  == 2. Key concepts ==
10 -This microlearning centers around calling a SOAP Webservice.
11 11  
12 -With SOAP, we mean: A messaging protocol specification for exchanging structured information in the implementation of web services in computer networks.
15 +This microlearning centers around learning how to define the character set to ensure that eMagiz processes the information correctly.
13 13  
14 -* To call a REST Webservice you need either:
15 - ** A Web Service Outbound Gateway
16 -* Critical information when configuring this component:
17 - ** URL
18 - ** Retry Advice
19 - ** Error Handling
20 - ** Authentication
21 -
22 -== 3. Calling a SOAP Webservice ==
17 +By character set, we mean: The composite number of different characters that are being used and supported by computer software and hardware. It consists of codes, bit patterns, or natural numbers used in defining some particular character.
23 23  
24 -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.
19 +* Some external system talk in a different character set
20 +* eMagiz talks in default UTF-8 as a character set and assumes everyone else also does this
21 +* In cases of mismatch correct is at the point where you talk with the other system (i.e. entry or exit)
25 25  
26 -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:
23 +== 3. Character set ==
27 27  
28 -* URL
29 -* Retry Advice
30 -* Error Handling
31 -* Authentication
25 +In some cases, the input you receive or the output that you need to send to an external party cannot handle all characters or the input or output is written with the help of a character set. In this microlearning, we will learn how you can define the character set for file-based connectivity to ensure that you can process and deliver files according to the specifications.
32 32  
33 -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.
27 +Sometimes external systems only talk in a specific character set. To ensure that all the data is properly communicated between eMagiz and the other system we need to make sure that we define which character set that is so we can tell it to eMagiz via a component. That way eMagiz will deviate from its default (i.e. UTF-8) and will process the file according to that different character set. In practice, we mainly see windows-1252 as an alternative that pops up once in a while. In various components that deal with file handling, you can define the character set on which eMagiz should act. Examples of such components are:
34 34  
35 -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:
29 +- File to string transformer
30 +- Flat file to XML transformer
31 +- File outbound channel adapter
36 36  
37 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--exit-flow-starting-point.png]]
33 +In all these components you have the option to define the character set within the Advanced tab of the component. In this microlearning, we will use the File to string transformer to illustrate how that will look.
38 38  
39 -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.
35 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-characterset--characterset-configuration.png]]
40 40  
41 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component.png]]
37 +In this field, you can define the character set of your choice. To make this work in eMagiz you need to navigate to the Create phase of eMagiz and open the entry flow in which you want to retrieve the file to a certain location. Within the context of this flow, we need to add functionality that will ensure that the correct character set is used. To do so first enter "Start Editing" mode on flow level. After that open, the File to string transformer, navigate to the Advanced tab, and fill in the correct character set. After you have defined the correct character set the only thing left to do is to Save the component. See the suggested additional readings section on the complete list of character sets that are supported by Java 8.
42 42  
43 -=== 3.1 URL ===
39 +Congratulations you have successfully learned how to specify the character set.
44 44  
45 -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.
41 +== 4. Assignment ==
46 46  
47 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-url.png]]
43 +Configure an entry in which you define the component and configuration needed to process a file on a per-line basis.
44 +This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment.
48 48  
49 -=== 3.2 Retry Advice ===
46 +== 5. Key takeaways ==
50 50  
51 -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.
48 +* Some external system talk in a different character set
49 +* eMagiz talks in default UTF-8 as a character set and assumes everyone else also does this
50 +* In cases of mismatch correct is at the point where you talk with the other system (i.e. entry or exit)
51 +* eMagiz provides several components within which you can define the character set
52 52  
53 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-button.png]]
53 +== 6. Suggested Additional Readings ==
54 54  
55 -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
55 +If you are interested in this topic and want more information on it please read the help text provided by eMagiz and read the following links:
56 56  
57 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-pop-up-empty.png]]
57 +* https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
58 +* https://www.techopedia.com/definition/941/character-set
59 +* https://www.smashingmagazine.com/2012/06/all-about-unicode-utf8-character-sets/
58 58  
59 -The best practice for this configuration is as follows for asynchronous solutions:
60 -* Select the option called Simple Retry Policy
61 -* Set the max attempts at 6
62 -* Select the Fixed back off policy
63 -* Set the backoff period at 5000 (ms)
61 +== 7. Silent demonstration video ==
64 64  
65 -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
63 +This video demonstrates how you could have handled the assignment and gives you some context on what you have just learned.
66 66  
67 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-pop-up-filled-in.png]]
65 +{{video attachment="novice-file-based-connectivity-characterset.mp4" reference="Main.Videos.Microlearning.WebHome"/}}
68 68  
69 -=== 3.3 Error Handling ===
70 -
71 -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".
72 -
73 -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.
74 -
75 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-fault-message-resolver.png]]
76 -
77 -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:
78 -
79 -[[image:Main.Images.Microlearning.WebHome@microlearning/novice-soap-webservice-connectivity-calling-a-soap-webservice--flow-result.png]]
80 -
81 -== 4. Key takeaways ==
82 -
83 -* eMagiz will create a valid SOAP message when using this component
84 -* eMagiz provides a support object for better error handling of SOAP faults
85 -* There are four key configuration elements:
86 - ** URL
87 - ** Retry Advice
88 - ** Error Handling
89 - ** Authentication
90 -
91 -== 5. Suggested Additional Readings ==
92 -
93 -* [[Crash Course (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.WebHome||target="blank"]]
94 -** [[Crash Course API Gateway (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]]
95 -*** [[Setting up Exit gate (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-setting-up-exit-gate||target="blank"]]
96 -* [[Novice (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Novice.WebHome||target="blank"]]
97 -** [[SOAP Web service Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.WebHome||target="blank"]]
98 -*** [[Configure your SOAP web service (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-configure-your-soap-webservice-gen3.WebHome||target="blank"]]
99 -*** [[Securing your SOAP Webservice (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-securing-your-soap-webservice||target="blank"]]
100 -*** [[Validate Incoming Messages (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-validate-incoming-messages-gen3.WebHome||target="blank"]]
101 -*** [[Endpoint Check (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-endpoint-check-gen3.WebHome||target="blank"]]
102 -*** [[SOAP Headers (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-soap-headers||target="blank"]]
103 -*** [[Authorization - Calling a SOAP Webservice (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-authorization-calling-a-soap-webservice||target="blank"]]
104 -* [[Intermediate (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.WebHome||target="blank"]]
105 -** [[SOAP Web service Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.SOAP Web service Connectivity.WebHome||target="blank"]]
106 -* [[Expert (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Expert Level.WebHome||target="blank"]]
107 -** [[Webservice Security (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Expert Level.Webservice Security.WebHome||target="blank"]]
108 -
109 109  )))((({{toc/}}))){{/container}}{{/container}}