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
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
on 2022/06/12 09:37
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - novice-soap-webservice-connectivity-configure-your-soap-webservice1 +SOAP Headers - Content
-
... ... @@ -1,67 +1,69 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 -n somecases,theinputyoureceiveortheoutput thatyouneedtosend to an externalparty cannothandle allcharacters or the inputoroutput iswrittenwiththe help ofacharacteret. In this microlearning, we will learnhow you candefinethecharacteretforfile-basedconnectivitytoensure thatyoucanprocessanddeliverfilesaccordingto thespecifications.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: May31th, 20217 -* Required reading time: 7minutes6 +* 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 - Thismicrolearning centers aroundlearninghowtodefine thecharactersettoensure thateMagizprocessesthe informationcorrectly.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 externalsystemtalkin a differentcharacterset20 - *eMagiztalks in default UTF-8 as a character set and assumes everyone else also does this21 - *Incasesof mismatch correct isat thepoint where you talk with the othersystem(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 externalsystemsonlytalkin a specific characterset.Toensure thatallthedata is properlycommunicated between eMagiz and the othersystem we need to make surethat we define which characterset thatis so we cantell it to eMagiz via a component. That way eMagiz will deviatefrom its default (i.e. UTF-8) and will process the file according to that different character set. In practice, wemainly see windows-1252 as an alternative that pops up oncein a while. In variouscomponents that deal with file handling, youcan define the character set onwhich eMagiz shouldact.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 allthese components you havetheoption to definethecharactersetwithin the Advanced tab of the component.Inthis microlearning,wewill usetheFile tostringtransformertoillustratehowthatwill 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 thisfield,you candefinethe character set ofyourchoice. To make this work ineMagizyouneed tonavigateto theCreatephaseofeMagizand openthe entryflowinwhichyou want toretrievethe filetoacertainlocation.Withinthe contextofthisflow,weneed toadd functionality that will ensure thatthecorrectcharacter setis used. To do so firstenter "StartEditing"mode onflowlevel. Afterthat open,theFileto string transformer,navigatetotheAdvancedtab,and fillin the correct characterset. Afteryouhave definedthecorrectcharactersetthe onlythinglefttodo istoSave thecomponent.Seethe suggestedadditionalreadings sectiononthecompletelistof charactersetsthat are supportedby 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 - Congratulationsyou 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 -C onfigurean entry in which you definetheomponentandconfigurationneeded toprocessafileonaper-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 -* Someexternal system talk ina differentcharacterset49 - *eMagiztalksindefaultUTF-8as a character setandassumes everyoneelse alsodoes this50 - *Incasesofmismatchcorrect ist thepoint where you talk with theothersystem(i.e.entry orexit)51 -* eMagiz providesseveralcomponents withinwhichyouefinethecharacterset56 +* 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 - Thisvideodemonstrates how you could have handledtheassignmentand givesyousometexton whatuhavejustlearned.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}}