Changes for page Endpoint Check

Last modified by Erik Bakker on 2024/02/21 21:35

From version 32.2
edited by Erik Bakker
on 2022/06/12 09:14
Change comment: Update document after refactoring.
To version 37.1
edited by Erik Bakker
on 2022/06/12 09:37
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -novice-soap-webservice-connectivity-configure-your-soap-webservice
1 +SOAP Headers
Content
... ... @@ -1,67 +1,69 @@
1 1  {{container}}{{container layoutStyle="columns"}}(((
2 -n 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.
2 +When communicating via SOAP web service calls it can happen that an exchange of data needs to happen between the message headers on your message and the SOAP headers. In this microlearning, we will learn about this exchange in both directions. SOAP Headers are headers within a SOAP Envelope that can be used to communicate metadata or authentication information between parties.
3 3  
4 -Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]].
4 +Should you have any questions, please contact academy@emagiz.com.
5 5  
6 -* Last update: May 31th, 2021
7 -* Required reading time: 7 minutes
6 +* Last update: June 10th, 2021
7 +* Required reading time: 5 minutes
8 8  
9 9  == 1. Prerequisites ==
10 -
11 11  * Basic knowledge of the eMagiz platform
12 12  
13 13  == 2. Key concepts ==
13 +This microlearning centers around SOAP Headers.
14 14  
15 -This microlearning centers around learning how to define the character set to ensure that eMagiz processes the information correctly.
15 +By SOAP Headers, we mean: headers within a SOAP Envelope that can be used to communicate metadata or authentication information between parties
16 16  
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.
17 +You can exchange data from:
18 +* SOAP Header to Message Header
19 +* Message Header to SOAP Header
18 18  
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)
21 +In both cases ensure that the correct information is exchanged.
22 +
23 +== 3. SOAP Headers ==
22 22  
23 -== 3. Character set ==
25 +When communicating via SOAP web service calls it can happen that an exchange of data needs to happen between the message headers on your message and the SOAP headers. In this microlearning, we will learn about this exchange in both directions. SOAP Headers are headers within a SOAP Envelope that can be used to communicate metadata or authentication information between parties.
24 24  
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.
27 +You can exchange data from:
28 +* SOAP Header to Message Header
29 +* Message Header to SOAP Header
26 26  
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:
31 +In both cases ensure that the correct information is exchanged.
28 28  
29 -- File to string transformer
30 -- Flat file to XML transformer
31 -- File outbound channel adapter
33 +In a previous microlearning, we already discussed one aspect of this. As you probably recall from our microlearning on [Securing your SOAP Webservice](novice-soap-web service-connectivity-securing-your-soap-webservice.md) we needed to exchange data between the SOAP header that our client was sending and a message header on the message so we could check whether or not the client was authorized to call the operation.
32 32  
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.
35 +In that microlearning, we also discussed the component that we need for this. The 'complex SOAP header mapper'.
34 34  
35 -[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-characterset--characterset-configuration.png]]
37 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-soap-headers--complex-soap-header-mapper.png]]
36 36  
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.
39 +As you can see you can map from and to message headers with regards to the SOAP Headers. As we already discussed the first scenario in an earlier microlearning I will for now continue with the other scenario. This scenario is mainly needed when eMagiz calls a SOAP web service that is hosted by an external party. Since we would normally do this in an exit (gate/flow) let us open such an exit in eMagiz and enter "Start Editing" mode.
38 38  
39 -Congratulations you have successfully learned how to specify the character set.
41 +The first step we need to take is to ensure that the information that we need to send to the SOAP web service in question (in this a unique reference number) is available in a message header. This can be done by verifying in all steps that preceded before the message entered the exit whether or not this piece of information was already added to a message header. In this case, we assume that this is the case since we want to focus on the 'complex SOAP header mapper' component and its relation to the web services outbound gateway. To correctly exchange data from a message header to a SOAP header we need to define a valid SpEL expression. See the help text of the component for a suggestion of what a valid SpEL expression is. The key part in this is knowing how the external party wants to receive the header(s) and how you (or one of your colleagues) has named the message header. When you have those two information elements you can write the correct expression. The result should be something as follows:
40 40  
43 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-soap-headers--mapping-from-message-header.png]]
44 +
45 +Once you are satisfied you can press Save and link the support object to the web service outbound gateway.
46 +
47 +With this information, you can place SOAP Headers on message headers and vice versa every time you need it.
48 +
41 41  == 4. Assignment ==
42 42  
43 -Configure an entry in which you define the component and configuration needed to process a file on a per-line basis.
51 +Call an external web service and send along some SOAP Headers.
44 44  This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment.
45 45  
46 46  == 5. Key takeaways ==
47 47  
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
56 +* You can exchange data from:
57 + ** SOAP Header to Message Header
58 + ** Message Header to SOAP Header
59 +* You need the SOAP structure and the message header name to make it work
52 52  
53 53  == 6. Suggested Additional Readings ==
54 54  
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:
63 +If you are interested in this topic and want more information on it please read the help text provided by eMagiz.
56 56  
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/
60 -
61 61  == 7. Silent demonstration video ==
62 62  
63 -This video demonstrates how you could have handled the assignment and gives you some context on what you have just learned.
67 +{{video attachment="novice-soap-webservice-connectivity-soap-headers.mp4" reference="Main.Videos.Microlearning.WebHome"/}}
64 64  
65 -{{video attachment="novice-file-based-connectivity-characterset.mp4" reference="Main.Videos.Microlearning.WebHome"/}}
66 -
67 67  )))((({{toc/}}))){{/container}}{{/container}}