Changes for page Calling a SOAP Web service
Last modified by Erik Bakker on 2024/08/26 12:56
From version 32.1
edited by Erik Bakker
on 2022/06/10 13:30
on 2022/06/10 13:30
Change comment:
There is no comment for this version
To version 40.1
edited by Erik Bakker
on 2024/08/26 12:56
on 2024/08/26 12:56
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -C haracterset1 +Calling a SOAP Web service - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,67 +1,108 @@ 1 -{{container}}{{container layoutStyle="columns"}}((( 2 -n somecases,the inputyoureceiveortheoutput that you needtosendto anexternalpartycannothandleallcharactersor the inputor outputiswrittenwith thehelpofacharacterset. In this microlearning, we will learn howyoucandefine the charactersetfor file-basedconnectivity to ensurethat you can process and deliver filesaccording tothespecifications.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 that configuration 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. 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 8 - 9 9 == 1. Prerequisites == 10 - 11 11 * Basic knowledge of the eMagiz platform 12 12 13 13 == 2. Key concepts == 10 +This microlearning centers around calling a SOAP Webservice. 14 14 15 - ThismicrolearningcentersaroundlearninghowtodefinethecharactersettoensurethateMagizprocessestheinformationcorrectly.12 +With SOAP, we mean: A messaging protocol specification for exchanging structured information in the implementation of web services in computer networks. 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. 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 == 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) 24 +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: 22 22 23 -== 3. Character set == 26 +* URL 27 +* Retry Advice 28 +* Error Handling 29 +* Authentication 24 24 25 - In some cases,the inputyoureceiveortheoutputthat youneedtosendtoanexternal party cannothandleall characters or the input orutput is writtenwithhehelpofa character set. In this microlearning, we will learnhow you candefinethecharactersetforfile-based connectivity toensurethatyoucan processand deliver files accordingto thepecifications.31 +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. 26 26 27 - Sometimesexternalsystemsonly talkina specific character set. Toensurethat all thedata is properlycommunicated between eMagiz andtheothersystemweneedtomakesurethat we define which charactersetthat is sowecantellit to eMagizvia a component.ThatwayeMagiz will deviatefromits default (i.e. UTF-8) andwill process thefile accordingtothatdifferentcharacterset.In practice, we mainlysee windows-1252 as an alternative that pops up oncein a while. Invariouscomponentsthat dealwithfile handling, youcan definethecharacter set onwhich eMagiz should act. Examplesofsuchcomponentsare:33 +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: 28 28 29 -- File to string transformer 30 -- Flat file to XML transformer 31 -- File outbound channel adapter 35 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--exit-flow-starting-point.png]] 32 32 33 - Inallthesecomponents you have the optiontodefinethe characterset withintheAdvanced tabofthecomponent. In this microlearning,wewill usethe Filetostringtransformertoillustratehowat will look.37 +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. 34 34 35 -[[image:Main.Images.Microlearning.WebHome@novice- file-based-connectivity-characterset--characterset-configuration.png]]39 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component.png]] 36 36 37 - Inthis field, you can define the character set of your choice.Tomake 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.41 +=== 3.1 URL === 38 38 39 - Congratulationsyouhavesuccessfullylearned howtospecifythe character set.43 +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. 40 40 41 - == 4.Assignment==45 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-url.png]] 42 42 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. 47 +=== 3.2 Retry Advice === 45 45 46 - ==5.Key takeaways==49 +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. 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 51 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-button.png]] 52 52 53 - ==6. SuggestedAdditionalReadings==53 +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 54 54 55 - If youareterestedinthistopicand want morenformationn itpleasead thehelp text providedby eMagiz andthefollowinglinks:55 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-pop-up-empty.png]] 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/ 57 +The best practice for this configuration is as follows for asynchronous solutions: 58 +* Select the option called Simple Retry Policy 59 +* Set the max attempts at 6 60 +* Select the Fixed back off policy 61 +* Set the backoff period at 5000 (ms) 60 60 61 - ==7.Silent demonstrationvideo==63 +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 62 62 63 - This video demonstrateshow youcould havehandled thesignmentdgivesyousomecontext onwhatou havejustlearned.65 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-pop-up-filled-in.png]] 64 64 65 - {{video attachment="novice-file-based-connectivity-characterset.mp4"reference="Main.Videos.Microlearning.WebHome"/}}67 +=== 3.3 Error Handling === 66 66 69 +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". 70 + 71 +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. 72 + 73 +[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-fault-message-resolver.png]] 74 + 75 +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: 76 + 77 +[[image:Main.Images.Microlearning.WebHome@microlearning/novice-soap-webservice-connectivity-calling-a-soap-webservice--flow-result.png]] 78 + 79 +== 4. Key takeaways == 80 + 81 +* eMagiz will create a valid SOAP message when using this component 82 +* eMagiz provides a support object for better error handling of SOAP faults 83 +* There are four key configuration elements: 84 + ** URL 85 + ** Retry Advice 86 + ** Error Handling 87 + ** Authentication 88 + 89 +== 5. Suggested Additional Readings == 90 + 91 +* [[Crash Course (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.WebHome||target="blank"]] 92 +** [[Crash Course API Gateway (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]] 93 +*** [[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"]] 94 +* [[Novice (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Novice.WebHome||target="blank"]] 95 +** [[SOAP Web service Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.WebHome||target="blank"]] 96 +*** [[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"]] 97 +*** [[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"]] 98 +*** [[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"]] 99 +*** [[Endpoint Check (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-endpoint-check-gen3.WebHome||target="blank"]] 100 +*** [[SOAP Headers (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-soap-headers||target="blank"]] 101 +*** [[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"]] 102 +* [[Intermediate (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.WebHome||target="blank"]] 103 +** [[SOAP Web service Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.SOAP Web service Connectivity.WebHome||target="blank"]] 104 +* [[Expert (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Expert Level.WebHome||target="blank"]] 105 +** [[Webservice Security (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Expert Level.Webservice Security.WebHome||target="blank"]] 106 +* [[Calling a SOAP Web service (Search Result)>>url:https://docs.emagiz.com/bin/view/Main/Search?sort=score&sortOrder=desc&highlight=true&facet=true&r=1&f_space_facet=0%2FMain.&f_type=DOCUMENT&f_locale=en&f_locale=&f_locale=en&text=%22calling+a+SOAP+Web+service%22||target="blank"]] 107 + 67 67 )))((({{toc/}}))){{/container}}{{/container}}